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]

Ive experienced this before falling asleep several times.
My eyes would close as if i went to sleep but i wasnt, i would try to open my eyes but they wouldnt they would just flutter