Why Do People Twitch When Falling Asleep?

A hypnagogic jerk is an involuntary muscle spasm that occurs as a person is drifting off to sleep.