It can also be a pretty awesome experience. For about two months I experienced it as a teenager. Initially it was terrifying, but after about two weeks it morphed into out of body experiences, which were amazing. It was like a combined sleep paralysis with lucid dreaming.
Sleep paralysis is only horrible when your mind makes it so. The sudden experience of not being able to move makes people panic, and that panic then snowballs into terrible hallucinations. If you know it is just your own mind you are witnessing, then you can steer the experience.
The key is to not fight it or keep forcing your body to move. The best move is to relax, go back to sleep, then attempt waking up at some other point. I have experienced headaches after forcing my body to move during that paralysis phase.
This is called Sleep Paralysis and it's pretty horrible to experience.
https://en.wikipedia.org/wiki/Sleep_paralysis