Body shaking during sleep is surprisingly common and usually harmless. Up to 70% of adults experience some form of involuntary muscle jerking during sleep at some point in their lives. The shaking can range from a single twitch as you drift off to repetitive limb movements throughout the night, and the causes and solutions depend on which type you’re dealing with.
What Type of Shaking You’re Experiencing
Not all sleep-related shaking is the same, and identifying what’s happening is the first step toward fixing it. The most common type is the sudden, full-body jolt that happens right as you’re falling asleep. These are called hypnic jerks, and they’re a normal physiological event triggered by the instability of your nervous system during the transition from wakefulness to sleep. Your brainstem essentially misfires, sending a sudden burst of signals to nearly all your body’s muscles at once. You might feel like you’re falling, jerk awake, and then fall back asleep within seconds.
A different pattern is repetitive, rhythmic leg or arm movements that happen throughout the night. These are periodic limb movements, and they involve brief, stereotypical muscle contractions that repeat every 5 to 90 seconds in clusters. You may not even know they’re happening unless a partner tells you or you wake up feeling unrested despite spending enough time in bed.
A third, less common type involves acting out dreams: pushing, kicking, punching, or shouting during the second half of the night while your eyes stay closed. This is REM sleep behavior disorder, and it’s worth mentioning to a doctor because it can signal underlying neurological changes. The movements tend to start about 90 minutes after you fall asleep and cluster in the final third of the night when dream sleep is most concentrated.
Why It Happens: Common Triggers
For hypnic jerks and general sleep-related shaking, a handful of triggers account for most cases. Caffeine and nicotine are the most straightforward culprits. Both are stimulants that keep your nervous system in a heightened state, making the sleep-wake transition rockier. Vigorous exercise close to bedtime has a similar effect: your muscles are still primed for activity when your brain is trying to shut them down.
Stress and anxiety play a major role. When your body is in a state of heightened alertness, stress hormones speed up your heart rate and breathing, and your muscles stay tensed and ready to react. That residual tension doesn’t always resolve the moment you close your eyes. It can carry over into the transition to sleep, producing trembling, twitching, or full-body jerks. Sleep deprivation compounds this. The more exhausted you are, the more abruptly your brain tries to shift into sleep, and the more likely those brainstem misfires become.
Low blood sugar is a less obvious but important trigger, especially if you notice shaking in the middle of the night rather than at sleep onset. When blood glucose drops below 70 mg/dL during sleep, your body responds with trembling, sweating, and a racing heartbeat. This is called nocturnal hypoglycemia and is most relevant for people with diabetes, though it can occur in anyone who goes to bed after skipping meals or drinking alcohol on an empty stomach.
Lifestyle Changes That Reduce Shaking
The most effective starting point is addressing the triggers listed above. Cut off caffeine at least six hours before bed (earlier if you’re sensitive). Finish intense workouts at least three to four hours before you plan to sleep. Both changes reduce the nervous system arousal that makes your muscles twitch during the sleep-wake transition.
Temperature matters more than most people realize. If your bedroom is below 60°F (15°C), your body works harder to warm itself, constricting blood vessels and putting extra pressure on your cardiovascular system. That physical stress response can contribute to muscle tension and shivering that disrupts sleep. Keep your bedroom between 60 and 67°F (15 to 19°C), which is the range that best supports stable sleep architecture, including the REM sleep phases where your body should be deeply relaxed.
A consistent wind-down routine helps reset your stress response before bed. This doesn’t need to be elaborate. Fifteen to twenty minutes of quiet activity, dim lighting, and avoiding screens gives your nervous system time to downshift. If anxiety is a significant factor in your life, addressing it directly through therapy, regular exercise (earlier in the day), or relaxation techniques will have downstream effects on your sleep quality.
Magnesium and Nutrient Support
Magnesium is the supplement most commonly recommended for sleep-related muscle issues, and there’s reasonable evidence behind it. It helps regulate muscle contraction and relaxation, and a deficiency (which is common in Western diets) can contribute to cramps, restless legs, and twitching. A Mayo Clinic sleep specialist recommends 250 to 500 milligrams taken as a single dose at bedtime.
The form you choose matters. Magnesium citrate has the most evidence for sleep benefits but acts as a strong laxative. Magnesium glycinate is gentler on the digestive system and is generally the better choice unless you’re dealing with constipation. Magnesium oxide is the cheapest option, though it’s less well absorbed. If your shaking is connected to leg cramps or restless legs, magnesium is a particularly reasonable first step to try.
Weighted Blankets
Weighted blankets have gained popularity for sleep issues, and the research is modestly encouraging. In randomized controlled trials, adults with insomnia who used weighted blankets reported improved sleep quality, shorter nighttime awakenings, reduced stress, and better morning mood. A follow-up study found that both adults and children with attention or sensory processing differences showed improvements in falling asleep, daytime relaxation, and evening routines when using weighted chain or ball blankets.
The results aren’t universal. One placebo-controlled trial in children with autism and severe sleep problems found no measurable improvement in sleep duration, sleep onset, or number of awakenings. The benefits seem most consistent in adults who struggle with stress-related sleep disruption rather than those with a specific neurological sleep disorder. If your shaking is tied to anxiety or general restlessness, a weighted blanket is a low-risk option worth trying.
When Shaking Points to Something More
Most sleep-related shaking responds to the changes above. But certain patterns suggest something beyond normal hypnic jerks or stress-related twitching.
- Repetitive leg movements that disturb your sleep quality: Periodic limb movement disorder is diagnosed when a sleep study shows 15 or more limb movements per hour of sleep, combined with daytime fatigue or difficulty staying asleep. If a partner reports that your legs kick rhythmically throughout the night, a sleep study (polysomnography) can measure the exact frequency and determine whether treatment would help.
- Acting out dreams with complex movements: REM sleep behavior disorder involves purposeful-looking actions like punching or grabbing during the second half of the night. People typically keep their eyes closed during episodes and, if woken, describe a dream that matches the movements. The dreams are often negative: being chased, attacked, or falling. This condition warrants medical evaluation.
- Night sweats, trembling, and confusion upon waking: If you have diabetes or take medications that lower blood sugar, nocturnal hypoglycemia can cause shaking during sleep. Checking your blood sugar when you wake from these episodes can confirm whether glucose levels are the issue.
For persistent shaking that doesn’t improve with lifestyle changes, a sleep study is the most informative next step. It records your brain waves, muscle activity, breathing, and limb movements throughout the night, giving a clear picture of exactly what’s happening and when.

