While these muscle spasms are not 100 percent understood, they are a common occurrence. As many as 70 percent of people experience this jerking sensation that happens when the body transitions from wakefulness to sleep. They usually only happen once, maybe twice, and they may last a half second or less.
Does twitching in your sleep mean anything?
In summary
Hypnic jerks and twitches are completely normal and quite common. They usually don't indicate an underlying health issue and are simply a muscle contraction during sleep that ranges from mild to intense.
Is it bad if you twitch while sleeping?
Hypnic jerks are different from other movements that can occur while you are awake or sleeping. Hypnic jerks occur during the transition from wakefulness into sleep, happen quickly, and are generally considered harmless. If you only experience hypnic jerks, you probably don't need to see a doctor.