Sleep paralysis is an interesting, and quite terrifying, phenomenon. What happens is that you wake up while still in REM sleep. Dreams intertwine with reality and can cause such experiences as hallucinations (auditory, visual, even olfactory), emotions (such as fear and dread), inability to move (because your body paralyzes you during REM to keep you from acting out your dreams, that carries over into this semi-wakeful state), and muscle soreness. Though sleep paralysis is more common among people who already have some form of sleep disturbance, such as insomnia, it can happen to anyone. It's been theorized that many so-called experiences of the paranormal are actually cases of sleep paralysis.
There's a great documentary on sleep paralysis I highly recommend if you'd like to learn more:
Has anything like this ever happened to you? Feel free to share in the comments!