When I was a child I used to have nightmares. One day, I simply told myself I liked nightmares (having realized they were not real) and since then I have never had any - and that actually makes me a bit sad .. some were really creative and interesting.
The only time I nowadays even remember dreaming is when I was stressed about something - and while I would not call any ensuing bad night that follows too much worrying about something as exactly being filled with 'nightmares', it is very obvious when stress shows up in getting less than peaceful deep sleep. It certainly can result in fitful sleep and that is very tiring .. which may lead to more stress the next day, etc. A self-fulfilling prophecy for some people I think.
If you are the kind of person who stresses out a lot or is generally anxious, then the only things I can really suggest are a) deal with the subject/object that is causing your stress head on before bedtime and/or b) learn to do a lot of 'de-stressing' on a regular basis and especially before bed - meditation, yoga, etc. might help you.