Sleep paralysis is a condition characterized by temporary paralysis of the body shortly after waking up (known as hypnopompic paralysis) or, less often, shortly before falling asleep (known as hypnagogic paralysis).[1]
Physiologically, it is closely related to the paralysis that occurs as a natural part of REM (rapid eye movement) sleep, which is known as REM atonia. Sleep paralysis occurs when the brain awakes from a REM state, but the bodily paralysis persists. This leaves the person fully aware, but unable to move. In addition, the state may be accompanied by hypnagogic hallucinations.
(Shamelessly Copy Carbonaraed from Wikipedia)