The one thing that I hate most about hallucinatory sleep paralysis is that at the time it occurs the visions and sensations I'm feeling are just too real. The inability to move in those moments usually puts me in a state of panic especially when I can not even do something as simple as let out a scream.
What you did not know is that is exactly what the body is trying to prevent. You are producing actual physical reactions to something that's just a dream. Imagine how chaotic it would be if we reacted to everything that went on while we are having our dreams. So unfortunately the change from total sleep to a state of full consciousness is not always a smooth one.
If for some reason your brain wakes up in the middle of a dream you will have a hard time trying to separate reality from fiction and so the paralysis sets in. Trust me I know; uncomfortable does not even come close to describing those few moments that you are struggling to move or say something. That is one characteristic of hallucinatory sleep paralysis. It is just too vivid and real.
So is there anything that can be done about it? Of course there are many causes to this and the solutions are just as many too. The underlying theory though is avoiding anything that will disrupt your normal sleep. Things that send signals to the brain and require it to become active. Things like light, sound or even going to sleep before emptying your bladder or bowels can bring about an episode.
Hallucinatory sleep paralysis is an acknowledged medical condition and therefore help is available for it. Do not be at the mercy of your dreams and continue having restless nights. You can do something about it.