If when it is happening you are aware that you are dreaming then you can control the dream, it's called lucid dreaming, I do it frequently.
Get used to it and don't give a crap about it. "Oh a bad guy coming to chop my head off. so what." Everything problem in the world is solved by that. Shortly "Don't give a ****"
sounds night terrors
I know, I have those all the time.
Google "Sleep Paralysis", as it sounds like that is what you may be referring to...it sucks, I know. I've experienced it.
Google 'Lucid Dreaming'... this will help...