If you’re lying in bed unable to sleep, the single most effective thing you can do is get up. That sounds counterintuitive, but staying in bed while frustrated trains your brain to associate your bed with wakefulness. The goal is to break that cycle with a few specific techniques, then set yourself up so it happens less often.
Get Out of Bed After 20 Minutes
If you haven’t fallen asleep within 15 to 20 minutes, get up and move to another room. Do something quiet and low-stimulation: fold laundry, read a physical book in dim light, or listen to calm music. The point is to retrain your brain so it pairs your bed with sleep, not with staring at the ceiling. When you start feeling drowsy, go back to bed. If another 20 minutes passes without sleep, repeat the process.
This approach, called stimulus control, is a core part of cognitive behavioral therapy for insomnia, the most effective long-term treatment for sleep problems. It works because your brain builds associations quickly. A few nights of lying awake in frustration can turn your bed into an anxiety trigger. Getting up breaks that link.
Try a Breathing Exercise in Bed
Before you resort to getting up, a structured breathing pattern can sometimes tip your nervous system toward sleep. The 4-7-8 technique is one of the most widely recommended: inhale through your nose for 4 seconds, hold your breath for 7 seconds, then exhale slowly through your mouth for 8 seconds. Repeat for three or four cycles.
The long exhale is what makes this work. It activates your body’s rest-and-digest response, slowing your heart rate and lowering blood pressure. A simpler alternative is box breathing: inhale for 4 seconds, hold for 4, exhale for 4, hold for 4. Both methods shift your nervous system out of the alert state that keeps you awake.
Relax Your Body From Your Toes Up
Progressive muscle relaxation is a technique recommended by Harvard Health that works well when your body feels physically tense. Lie on your back and start at your feet: curl your toes and arch your feet, hold the tension briefly, then release and let your feet sink into the mattress. Move slowly upward through your calves, thighs, buttocks, lower back, abdomen, upper back, shoulders, arms, hands, neck, jaw, and forehead, tensing and then releasing each area.
Most people don’t make it to their forehead. The combination of focused attention and physical release tends to pull you toward drowsiness within a few minutes. If you feel your mind wandering to worries or to-do lists, just redirect your attention back to the next muscle group.
Distract Your Racing Thoughts
A busy mind is one of the most common reasons people can’t sleep. One technique that works surprisingly well is called cognitive shuffling. Pick a random, emotionally neutral word, like “cake.” Take the first letter (C) and visualize as many objects as you can that start with it: car, carrot, cottage, candle. Picture each one clearly before moving to the next. When you run out, move to the second letter (A) and repeat.
The key is choosing boring, neutral categories. Animals, grocery items, and household objects work well. Anything related to work, finances, or relationships can activate the exact alertness you’re trying to avoid. The technique works because it mimics the random, loosely connected imagery your brain produces as it drifts into sleep, essentially tricking your mind into the early stages of the process.
Check Your Room Temperature
Your bedroom may simply be too warm. The optimal sleeping temperature for adults is between 60 and 67°F (15 to 19°C), which is cooler than most people keep their homes. Your body needs to drop its core temperature slightly to initiate sleep, and a warm room fights that process. If you don’t have precise thermostat control, a fan, lighter blankets, or sleeping with one foot outside the covers can help. For babies and toddlers, the recommended range is slightly higher, between 65 and 70°F.
Put Your Phone in Another Room
Screen light directly suppresses melatonin, the hormone that signals your brain it’s time to sleep. Blue light from phones and tablets is particularly potent at this, more effective at blocking melatonin than the white fluorescent light used in most overhead fixtures. Even if you dim the screen or use a night mode filter, the act of scrolling keeps your brain in an engaged, alert state. If you’re reaching for your phone because you can’t sleep, you’re making the problem worse. Move it to another room or at least across the bedroom where you can’t reach it from bed.
Set Yourself Up Earlier in the Day
What you do during the day shapes how easily you fall asleep at night. Caffeine is the biggest hidden culprit. It has a half-life of about five to six hours, meaning half the caffeine from your afternoon coffee is still circulating in your bloodstream at bedtime. Research shows that caffeine consumed even six hours before bed can disrupt sleep, sometimes without you noticing the connection. A good cutoff is 2 or 3 p.m. if you follow a standard evening bedtime.
Magnesium is one supplement with genuine evidence behind it for sleep. It helps maintain the balance between excitatory and calming chemical signals in your nervous system and plays a role in melatonin production. The recommended dose is 250 to 500 milligrams taken at bedtime. Magnesium glycinate is the form most commonly suggested for sleep because it’s well absorbed and less likely to cause digestive issues.
When Sleeplessness Becomes Insomnia
Everyone has occasional bad nights. But if you’re struggling to fall or stay asleep at least three nights a week, and it’s been going on for three months or longer, that meets the clinical definition of chronic insomnia. At that point, the techniques above may not be enough on their own. Cognitive behavioral therapy for insomnia is the first-line treatment, and it’s more effective than sleep medications over the long term because it addresses the patterns and associations driving the problem rather than just sedating you through them. Many therapists now offer it in structured programs of four to eight sessions, and online versions have shown strong results as well.

