Nightmare has a lot of meaning and it depends on the person talking. Old folks say that a dream is a portent of the future so they would try hard to analyze and find a meaning to a nightmare, the same way the do with dreams. My take on nightmares is this – a manifestation of a physical problem. I usually experience a nightmare when I have pains in my body. One time I had severe back pain due to kidney stones, my dream was about a vehicle pushing on my back. Another time when I had a headache, my dream was an unknown buy was pulling my hair. A dream or a nightmare is connected to our physical and mental condition when we are asleep.
Hahahaha, the dude above me though.
But look at it this way, Nightmare is an accumulation of negative energies through the dark source, the source of all evil in the cosmic realm, through movies,audio or feelings, playing out on a higher dimension on the astral plane with your soul inter playing the coded signals in a 3D space.
And your mental plane receiving the signals at the speed of thought and if the frequency is too high for your mental construct to subdue, then your body kicks in on the physical plane, withdrawing your soul from the astral protection at the speed of taught, that's when you wake up.