Sleep paralysis
Being unable to move for a short time while falling asleep or waking up. The mind is awake, but the body does not obey for a while.
A little more detail
A state of being unable to move voluntarily while conscious, at the transition into sleep or on waking. In a systematic review pooling 35 studies (36,533 people in total), the lifetime rate of experiencing it at least once was 7.6% in the general population, 28.3% in students and 31.9% in psychiatric patients; in people with panic disorder the rate was 34.6%. When it occurs together with excessive daytime sleepiness and cataplexy, sleep paralysis can be one of the symptoms of type 1 narcolepsy.
Source: Sharpless BA, Barber JP. Lifetime prevalence rates of sleep paralysis: a systematic review. Sleep Med Rev. 2011;15(5):311-315. doi:10.1016/j.smrv.2011.01.007; Bassetti CLA, Adamantidis A, Burdakov D et al. Narcolepsy: clinical spectrum, aetiopathophysiology, diagnosis and treatment. Nat Rev Neurol. 2019;15(9):519-539. doi:10.1038/s41582-019-0226-9