Do you know what's causing the nightmares? I used to have nightmares after watching really scary movies. No more of that kind of movie meant fewer bad dreams. If you can avoid whatever is causing you to have nightmares, you'll probably stop them.
Try relaxing before bed. Take a hot shower or bath or watch a calming or funny tv show and sip on chamomile tea or any other tea. Keep your mind on tranquil and calming things. If you do wake up with a nightmare, put your mind to ease by telling yourself it isn't true. Find a friend who you can call at any time to talk you through the situation or a significant other or parent. Focus on staying calm before bed, it always helped me as well as having someone to talk to and reassure you it's all in your head. Good luck!
Before you go to sleep, think about nice things you want to dream about. Think of happy times you've had. It may help you. You could also watch kid movies or comedy movies before going to sleep to put you in a good mood.
Well, when I'm about to go to sleep i always make sure that my armpits have the covers under them. Because if they are cold/exposed I have nightmares. I also can't sleep on my back or with my arms above my head because i'll have nightmares. Try not to have sugar before you go to sleep. Don't watch any scary movies or stuff that you don't want to have nightmares about. That's all I can think of. ^ _ ^