If you’re lying in bed unable to fall asleep, the single most effective thing you can do is get up. It sounds counterintuitive, but staying in bed while awake trains your brain to associate the bed with wakefulness instead of sleep. Below are specific techniques and adjustments, from what to do right now to longer-term fixes that prevent the problem from recurring.
Get Out of Bed
The foundation of every clinical sleep program is a simple rule: if you’re not asleep within roughly 15 to 20 minutes, leave the bedroom. This approach, called stimulus control, was developed by sleep researcher Richard Bootzin and works by strengthening the mental link between your bed and sleep while breaking the link between your bed and frustration. Go to another room, do something quiet and low-stimulation (reading a physical book, folding laundry, listening to a calm podcast), and return only when you feel genuinely sleepy. The same rule applies if you wake up in the middle of the night and can’t drift off again.
Don’t watch the clock. Checking the time fuels anxiety about how little sleep you’re getting, which makes it harder to relax. Turn your phone face down or angle your alarm clock away from view.
Slow Your Breathing Down
Your nervous system has two modes: one that revs you up and one that calms you down. Controlled breathing directly activates the calming side, lowering your heart rate and blood pressure. The most well-known pattern is 4-7-8 breathing: inhale through your nose for four counts, hold for seven counts, exhale slowly through your mouth for eight counts. Repeat this for four to six cycles.
The extended exhale is the key part. Any breathing pattern where the out-breath is longer than the in-breath will nudge your body toward relaxation. If the 4-7-8 ratio feels uncomfortable, try inhaling for three counts and exhaling for six. The more consistently you practice this (even during the day), the faster your body learns to shift into a relaxed state when you use it at night.
Quiet a Racing Mind
Lying awake often means your brain is stuck processing the day or rehearsing tomorrow. A technique called cognitive shuffling can short-circuit that loop. Pick a neutral word with at least five letters, like “GARDEN.” For the first letter, G, picture random things that start with G: a grape, a guitar, a goat, a globe. Visualize each one briefly, then move to the next letter. The randomness of the images prevents your mind from building a coherent worry narrative, and the mild boredom it creates mimics the drift toward sleep.
If visualization isn’t your style, a body scan works on a similar principle. Starting at your toes, focus your attention on each body part and consciously relax it, working your way up to your scalp. The goal in both cases is the same: replacing anxious, verbal thinking with something sensory and monotonous.
Try Non-Sleep Deep Rest
Non-Sleep Deep Rest (NSDR) is a guided practice that combines breathing, visualization, and body awareness exercises, typically lasting 10 to 30 minutes. Research shows it decreases activity in the stress-response side of the nervous system while boosting dopamine levels and reducing heart rate. Brain wave measurements during NSDR show a slowing that overlaps with early stages of sleep, sometimes to the point where people stop responding to their environment. Free NSDR recordings are widely available on YouTube and apps. Even if you don’t fall asleep during one, you’ll likely feel noticeably more rested afterward.
Cool Your Room
Your body needs to drop its core temperature by about one to two degrees to initiate sleep. A warm room fights that process. The ideal bedroom temperature is between 60 and 68°F (15.6 to 20°C), with 65°F (18.3°C) being the sweet spot for most people. If you can’t control your thermostat, a fan, lighter bedding, or wearing less to bed achieves a similar effect. Taking a warm shower 60 to 90 minutes before bed also helps, because the rapid cooling afterward accelerates that core temperature drop.
Cut the Screens Earlier
Two hours of exposure to a backlit screen can suppress your body’s sleep hormone production by 55% and delay your natural sleep onset by an hour and a half compared to reading a printed book under dim light. That delay doesn’t just make it harder to fall asleep tonight; it shifts your entire internal clock later. If you can’t avoid screens in the evening, use the lowest brightness setting and enable a warm-toned night mode. But the most reliable fix is switching to non-screen activities in the last hour before bed.
Use Background Sound Strategically
If silence makes your mind louder, background noise can help. White noise contains all audible frequencies at equal intensity, which effectively masks sudden sounds like traffic or a partner shifting. Pink noise emphasizes lower frequencies and filters out harsher, higher-pitched tones, creating a deeper, more even sound that many people find more pleasant (think steady rain or a distant waterfall). Brown noise goes even deeper, with a rumbling quality like strong wind. All three work primarily by masking disruptive sounds and giving your brain something neutral to process. Keep the volume below 70 decibels (roughly the level of a normal conversation) to avoid hearing strain over time.
Eat the Right Bedtime Snack
Going to bed hungry can keep you awake, but the wrong snack can too. The ideal option combines a small amount of carbohydrate with protein or healthy fat. Carbohydrates help your brain absorb tryptophan, an amino acid your body converts into serotonin and then into the sleep hormone melatonin.
Some specific foods that pull double duty: tart cherries and tart cherry juice contain both melatonin and compounds that improve sleep quality in studies. Pistachios have the highest melatonin content of any nut and are also rich in tryptophan. Bananas, pineapple, and oranges have been shown to increase melatonin production about two hours after eating them. Oats contain both magnesium and melatonin, making a small bowl of overnight oats with banana a particularly good combination. Yogurt supplies calcium, B vitamins, and a calming neurotransmitter called GABA. A handful of almonds or cashews provides magnesium, which supports muscle relaxation.
Consider Magnesium
Magnesium plays a role in muscle relaxation and nervous system regulation, and many people don’t get enough from their diet. For sleep, a dose of 250 to 500 milligrams taken as a single dose at bedtime is the range typically suggested. The form matters: magnesium citrate has the most research behind it for sleep, but it has strong laxative effects. Magnesium glycinate is gentler on the stomach and still well-absorbed. Magnesium oxide is the least expensive option, though it’s not absorbed as efficiently. If you’re prone to constipation, citrate might actually be a benefit; otherwise, glycinate is the more comfortable choice.
When Sleeplessness Becomes a Pattern
A bad night here and there is normal. Chronic insomnia is defined as difficulty sleeping at least three nights per week for three months or longer. That three-month threshold matters because research shows insomnia that persists beyond that point is much more likely to continue without intervention. If that describes your situation, the gold-standard treatment isn’t a pill. It’s cognitive behavioral therapy for insomnia (CBT-I), a structured program that combines the stimulus control techniques above with sleep restriction, relaxation training, and reframing of the anxious thought patterns that fuel the cycle. CBT-I is available through therapists, online programs, and apps, and it works for the majority of people who complete it.

