by my personal opinion
nihgtmare is come when we struggle with our mind.
it is because of the inner demon..when we feel depressive ,
then our mind is so think different thing ,,and its created different
thing between real life and imaginary life,,its wrong to think about ghosts and monsters as nightmare,,nightmare is come when we feel physically unstable about different things,
dear @nomad-magus sir