If you’re lying in bed unable to fall asleep, the single most effective thing you can do right now is get up. Staying in bed while awake trains your brain to associate the bed with frustration rather than sleep, making the problem worse over time. What you do in the next 20 to 30 minutes can reset your body’s readiness for sleep and get you back on track.
Get Out of Bed After 20 Minutes
If you’ve been awake for roughly 20 minutes, or you’re starting to feel frustrated, leave your bed and move to another room. This isn’t giving up on sleep. It’s a core technique from cognitive behavioral therapy for insomnia, the most effective long-term treatment for sleep problems. The goal is to break the mental link between your bed and the anxious, wide-awake state you’re in right now.
Once you’re up, do something low-key and non-stimulating: read a physical book, fold laundry, journal, do gentle stretches, listen to calm music, or flip through a catalog. Avoid anything with a screen or anything that requires active problem-solving. When you start to feel genuinely drowsy, not just tired, go back to bed. If sleep doesn’t come again within 20 minutes, repeat the cycle. It can feel tedious the first few nights, but this approach retrains your brain surprisingly fast.
Try a Breathing Exercise in Bed
Before you get up, or once you return to bed feeling drowsy, a structured breathing technique can help your body shift out of its alert state. The 4-7-8 method is one of the simplest: breathe in through your nose for 4 counts, hold for 7 counts, then exhale slowly through your mouth for 8 counts. Repeat three or four times.
This works because the extended exhale activates your parasympathetic nervous system, the part of your nervous system responsible for calming down the stress response. When you can’t sleep, your body is often stuck in a low-grade fight-or-flight mode, even if you don’t feel particularly stressed. Slow, deliberate breathing is one of the fastest ways to dial that down.
Quiet Your Racing Thoughts
A busy mind is one of the most common reasons people can’t fall asleep. If your brain keeps cycling through worries, to-do lists, or random thoughts, try a technique called cognitive shuffling. Pick a random, emotionally neutral word like “cake.” Take the first letter (C) and picture as many objects as you can that start with that letter: car, carrot, cottage, candle. Visualize each one briefly before moving to the next. When you run out of C words, move to the next letter in your original word (A) and repeat.
This works because it mimics the random, associative thinking your brain naturally does as it drifts toward sleep. It’s boring enough to lull you but engaging enough to crowd out anxious thoughts. The key is choosing neutral words. Think supermarket items or animals, not anything tied to your emotions or responsibilities.
Put Your Phone Away
If you’re reading this on your phone in bed, finish this article and then put it face-down on a nightstand or in another room. Screens emit blue light that suppresses your body’s production of melatonin, the hormone that signals it’s time to sleep. Harvard researchers found that blue light exposure suppressed melatonin for about twice as long as other types of light and shifted the body’s internal clock by up to 3 hours.
The general recommendation is to avoid bright screens for two to three hours before bed. That’s not always realistic, but even 30 to 60 minutes of screen-free time before you try to sleep again makes a measurable difference. If you use your phone as an alarm, switch it to airplane mode so notifications don’t pull you back in.
Check Your Bedroom Setup
Your sleep environment plays a bigger role than most people realize. Temperature is the factor that trips people up most often. Research tracking over 3.75 million nights of sleep data found that bedroom temperatures outside the 65 to 70°F range (about 18 to 21°C) consistently produced worse sleep. If your room feels warm, open a window, turn on a fan, or lower the thermostat. A cooler room helps your core body temperature drop, which is a necessary step in falling asleep.
Beyond temperature, check for light leaks. Even small amounts of ambient light from streetlamps, charging indicators, or hallway lights can interfere with sleep. A blackout curtain or a simple sleep mask can help. Noise is more individual. Some people sleep better in silence, others with consistent background sound like a fan or white noise machine. The important thing is that the noise is steady and predictable, not intermittent.
Review What You Consumed Today
Tonight’s sleeplessness may have roots in this afternoon’s coffee. Caffeine has a half-life of four to six hours, meaning half the caffeine from a 3 p.m. cup of coffee is still circulating in your system at 9 p.m. A good rule of thumb is to cut off caffeine by early to mid-afternoon. If you’re particularly sensitive, noon might be a better cutoff.
Alcohol is the other common culprit. It makes you feel drowsy initially but fragments your sleep in the second half of the night, often causing the kind of 2 or 3 a.m. wakefulness that’s hard to recover from. Heavy or spicy meals close to bedtime can also keep you awake through acid reflux or general digestive discomfort. If tonight’s already a lost cause on the dietary front, keep these patterns in mind for tomorrow.
Supplements That May Help
Melatonin is the most widely used sleep supplement, but most people take too much. The NHS recommends a starting dose of just 2 mg in a slow-release form, taken one to two hours before bedtime for short-term sleep problems. Higher doses don’t necessarily work better and can leave you groggy the next morning. Melatonin is most useful for circadian rhythm issues, like jet lag or a shifted sleep schedule, rather than general anxiety-driven insomnia.
Magnesium is another option worth considering. It plays a role in nervous system regulation, and many adults don’t get enough through diet alone. Mayo Clinic recommends 250 to 500 mg taken as a single dose at bedtime. Magnesium glycinate is a good form to look for because it’s well absorbed and gentle on the stomach. Magnesium citrate also has evidence behind it but tends to have laxative effects, which isn’t ideal at bedtime unless constipation is also an issue for you.
When Sleepless Nights Become a Pattern
A bad night here and there is normal. Stress, travel, schedule changes, and even exciting life events can temporarily disrupt sleep. But if you’re struggling to fall or stay asleep at least three nights per week and it’s been going on for three months or more, that meets the clinical definition of chronic insomnia. At that point, the strategies in this article are still useful, but they work best as part of a structured program.
Cognitive behavioral therapy for insomnia (CBT-I) is the first-line treatment for chronic insomnia, recommended ahead of medication by every major sleep medicine organization. It typically involves four to eight sessions and addresses the behavioral and thought patterns that keep insomnia going. Many people see significant improvement within two to three weeks. Your doctor can refer you to a sleep specialist, or you can access CBT-I through several validated online programs if in-person therapy isn’t accessible.

