[ELI5] Why does the body twitch when trying to fall asleep if you are really tired?
These movements are called hypnic jerks or sleep starts – they are usually brief and can occur in any part of the body.
They are most commonly experienced, as you say, when a person is feeling tired or drowsy and are often accompanied by a feeling of falling or a sensation of a sudden shock.
There is no one single reason why hypnic jerks occur, but they may be caused by a number of factors, such as stress, fatigue, caffeine consumption, or certain medications. They can also be a normal part of the sleep process and do not typically indicate any underlying health problem.
There’s no hard confirmed reason, but the leading hypothesis is that it’s a leftover instinct reaction, developed when our early ancestors would sleep in trees.
Those that started to fall out and awoke in a startle lived longer and reproduced more than those that stayed asleep while they fell out of the tree.