In this condition, a person partially wakes up from sleep to find himself paralyzed. (Paralysis while asleep is normal and is believed to prevent injuries while asleep.) Because he is not fully awake, however, his recognition of the paralysis often results in hallucinations of being restrained or abducted by a variety of nightmarish things produced by the subconscious.
After reading this article, it seems to me that a lot of superstitious/religious belief in things like demons, evil spirits, alien abductions, astral projection, etc. may be a manifestation of this condition.