Some nighttime movement is completely normal. Healthy adults shift positions roughly once or twice per hour during sleep, which adds up to about 12 to 16 position changes over a full night. The problem starts when you’re conscious of it: lying awake, flipping from side to side, unable to settle. The fixes range from simple environment changes to addressing underlying conditions you might not know you have.
Why Your Body Won’t Stay Still
Your brain only paralyzes your muscles during REM sleep, the dreaming phase that recurs every 90 minutes or so and lasts 15 to 20 minutes per cycle. During all the other sleep stages, you’re physically capable of moving, and your body does. It shifts to relieve pressure points, regulate temperature, and adjust breathing. That’s healthy.
Restlessness becomes a problem when something keeps pulling you out of deeper sleep into lighter stages where movement is more likely. The most common culprits are a room that’s too warm, caffeine still circulating in your system, stress hormones keeping your brain alert, or physical discomfort from your mattress or pillow. Less obvious triggers include sleep apnea, where your airway partially closes and your brain jolts you awake to restore breathing. People with sleep apnea can experience hundreds of these brief micro-arousals per night, sometimes with violent jerks, without remembering any of them. The only clue is feeling exhausted the next day.
Cool Your Bedroom Down
The National Sleep Foundation recommends keeping your bedroom between 60 and 67°F (15.5 to 19.4°C). Some sleep specialists push for the lower end of that range, closer to 60 to 65°F. Interestingly, a 2023 study of older adults found the most restful sleep occurred between 68 and 77°F, suggesting individual tolerance varies and skews warmer with age.
If you don’t control your thermostat, a fan pointed at your bed, breathable cotton or bamboo sheets, and sleeping without socks can all help. Your core body temperature naturally drops as you fall asleep. Anything that interferes with that cooling process, like a thick comforter in a warm room, keeps you in lighter, more restless sleep.
Fix Your Pillow and Mattress Setup
A lot of tossing and turning comes from your body trying to find a position that doesn’t hurt. The fix is matching your pillow height to your sleeping position so your spine stays in a neutral line. Side sleepers need the most loft, typically 5 to 7 inches, because the pillow has to fill the gap between your shoulder and your head. Back sleepers do best with 4 to 6 inches. Stomach sleepers need a very thin pillow or none at all.
Your mattress firmness matters too, because it changes how much your body sinks. On a firm mattress, you need a higher-loft pillow since your body stays on top of the surface and the gap between your head and the mattress is larger. On a soft mattress, a lower-loft pillow compensates for the deeper sinkage. If you wake up with neck stiffness or lower back pain, your pillow-mattress combination is likely off, and your body has been repositioning all night trying to compensate.
Cut Caffeine Earlier Than You Think
Caffeine has a half-life of about five to six hours, meaning half of it is still active in your system that long after your last cup. Research shows that caffeine consumed even six hours before bedtime measurably fragments sleep, even when people don’t feel like it’s affecting them. If you go to bed at 11 p.m., your last coffee should be no later than early afternoon. For people who are especially caffeine-sensitive, noon is a safer cutoff.
Alcohol works differently but causes similar problems. It may help you fall asleep faster, but it disrupts the second half of the night as your body metabolizes it, leading to lighter sleep, more awakenings, and more movement.
Quiet a Racing Mind
If your body is comfortable but your brain won’t stop, the issue is cognitive arousal. You’re mentally rehearsing tomorrow’s problems or replaying today’s conversations, and that keeps your nervous system in a state that resists sleep. One technique that works well for this is called cognitive shuffling.
Here’s how it works: pick a simple, neutral word like “chair” or “water.” Take the first letter and think of as many unrelated words as you can that start with that letter. For “table,” you’d start with T and picture a tree, then a train, then a towel. When you run out, move to the next letter: A gives you apple, arrow, ant. The key is to actually visualize each object briefly before moving on. This mimics the random, drifting quality of pre-sleep thought and gives your brain something too boring to stay alert for, but just structured enough to keep anxious thoughts from creeping back in. It doesn’t always work on the first try. Some nights you’ll drift off within one word; other nights it takes several rounds or a different approach entirely.
Progressive muscle relaxation is another option. Starting at your feet, tense each muscle group for five seconds, then release. Work your way up through your calves, thighs, abdomen, hands, arms, and face. The tension-then-release cycle triggers a physical relaxation response that’s hard to achieve by simply telling yourself to relax.
Rule Out Restless Legs and Limb Movements
Two medical conditions cause restlessness that no amount of bedroom optimization will fix. Restless legs syndrome (RLS) creates an irresistible urge to move your legs when you’re lying still, often accompanied by burning, crawling, or tugging sensations deep inside the legs. Walking or stretching temporarily relieves it, which is why people with RLS pace, constantly shift their legs, and toss and turn in bed. It’s a waking symptom you’re aware of.
Periodic limb movement disorder (PLMD) is different. Your legs or arms twitch and jerk every 20 to 40 seconds during sleep, but you typically don’t know it’s happening. The giveaway is poor sleep quality despite feeling like you slept through the night, daytime sleepiness you can’t explain, or a bed partner who complains about being kicked. PLMD requires an overnight sleep study to diagnose, since you can’t observe it yourself.
Both conditions are linked to iron deficiency, anemia, and kidney problems, so blood work is usually part of the diagnostic process. If your restlessness specifically involves uncomfortable leg sensations or if your partner reports repetitive jerking movements, these are worth investigating rather than assuming it’s just stress or a bad mattress.
Consider Magnesium Supplementation
Magnesium plays a role in muscle relaxation and nervous system regulation, and many people don’t get enough of it through diet. A sleep specialist at Mayo Clinic recommends 250 to 500 milligrams taken as a single dose at bedtime. Magnesium citrate has the most research behind it as a sleep aid, but it also has strong laxative effects. Magnesium glycinate is gentler on your digestive system and is the more popular choice for sleep. Magnesium oxide is the least expensive option.
Skip the topical sprays and gels. Magnesium absorption through the skin is poor, and these products aren’t effective enough to recommend for sleep. Oral supplements are the way to go.
Build a Pre-Sleep Wind-Down
Your body doesn’t have an on/off switch for sleep. It needs a transition period. In the 60 to 90 minutes before bed, lower the lights in your home, put screens away or use a blue-light filter, and do something low-stimulation: reading, stretching, a warm shower. The warm shower works particularly well because when you step out, your body temperature drops rapidly, which signals your brain that it’s time to sleep.
Consistency matters more than any single trick. Going to bed and waking up at the same time every day, including weekends, strengthens your circadian rhythm so your body anticipates sleep at the right time. When your internal clock is well-calibrated, you fall asleep faster, spend more time in deep sleep, and move less throughout the night.

