It's called Sleep Paralysis and is nothing to worry about. It happens to me sometimes too.
Sleep paralysis is a phenomenon in which an individual, either during falling asleep or awakening, temporarily experiences an inability to move, speak, or react.
It is a transitional state between wakefulness and sleep, characterized by an inability to move muscles. It is often accompanied by terrifying hallucinations to which one is unable to react due to paralysis, and physical experiences (such as strong current running through the upper body). These hallucinations often involve a person or supernatural creature suffocating or terrifying the individual, accompanied by a feeling of pressure on one's chest and difficulty breathing. Another common hallucination type involves intruders (human or supernatural) entering one's room or lurking outside one's window, accompanied by a feeling of dread.
One hypothesis is that it results from disrupted REM sleep, which normally induces complete muscle atonia to prevent sleepers from acting out their dreams. Genetics and sleep deprivation are a major cause of sleep paralysis,[1] and it has also been linked to disorders such as narcolepsy,migraines, anxiety disorders, and obstructive sleep apnea.[2][3] Sleeping in a fixed supine position increases the chance of sleep paralysis.