If you’re lying in bed staring at the ceiling, 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 instead of sleep, making the problem worse over time. What follows are concrete steps you can take tonight and habits that prevent this from happening again.
Get Out of Bed After 15 to 20 Minutes
If you haven’t fallen asleep within roughly 15 to 20 minutes, get up 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 simple: your bed should only be a place where you sleep (or have sex), not a place where you lie awake worrying.
Once you’re up, do something quiet and low-stimulation. Read a physical book, fold laundry, listen to a calm podcast, or do a simple puzzle. Keep the lights dim. When you start to feel genuinely sleepy, not just tired, go back to bed. If sleep doesn’t come again within 15 to 20 minutes, repeat the cycle. It can feel tedious, but it works because it rebuilds the mental link between your bed and actual sleep.
Try a Breathing Exercise
Slow, deliberate breathing activates the vagus nerve, which shifts your nervous system out of its alert, fight-or-flight mode and into a calmer state. Two techniques are worth knowing.
The first is box breathing: inhale through your nose for a count of four, hold for four, exhale for four, hold for four. Repeat three or four times. It’s simple enough that you can do it without thinking too hard, which is the point.
The second is 4-7-8 breathing. Place the tip of your tongue behind your upper front teeth, then exhale fully through your mouth with a whooshing sound. Inhale through your nose for four counts, hold for seven, then exhale forcefully through your mouth for eight counts, making that same whoosh. Repeat three more times. The long exhale is what does the heavy lifting here, giving your body a clear signal to wind down. Both methods have been shown to reduce anxiety and lower physiological arousal.
Quiet Racing Thoughts With Cognitive Shuffling
If your mind is looping through tomorrow’s to-do list or replaying a conversation from earlier, you need to give it something else to chew on. Cognitive shuffling is a technique designed to gently scramble your thoughts into meaninglessness, mimicking the random, drifting quality of the moments just before sleep.
Pick any random word, like “piano.” Then, for each letter of that word, spend five to eight seconds thinking of as many unrelated words as you can that start with that letter. For “P,” you might think: pear, parachute, penguin, pirouette. Then move to “I”: igloo, intention, island, ivy. The key is that the words should be random, boring, and emotionally neutral. You’re not solving a problem or telling a story. You’re deliberately producing mental noise. Most people don’t make it past the second or third letter before drifting off.
Relax Your Body in Stages
Progressive muscle relaxation works by tensing and then releasing muscle groups one at a time, which makes it easier to notice and let go of physical tension you didn’t realize you were holding. Start at your hands: clench them tightly as you breathe in, hold for five to ten seconds, then release all at once as you exhale. Notice the contrast between tension and relaxation. Repeat two or three times per group before moving on.
Work through your body in this general order: hands and forearms, upper arms and shoulders, forehead, eyes and nose, jaw and mouth, stomach, thighs, calves, and finally toes. The whole sequence takes about ten to fifteen minutes. By the time you reach your feet, you’ll likely feel noticeably heavier and more relaxed. You can do this in bed since the activity itself is restful, unlike scrolling your phone or watching TV.
Put Your Phone Away
The light from screens suppresses melatonin, the hormone that tells your brain it’s time to sleep. Current guidelines recommend keeping bright artificial light below a very low threshold during the three hours before bed. You don’t need to sit in darkness all evening, but if you’re already struggling to fall asleep, looking at a bright screen is actively working against you.
If you absolutely need to use your phone, switch it to its dimmest setting with a warm or red-toned filter. Better yet, put it in another room. The content matters too. Checking email or social media invites the kind of mental engagement and emotional reactivity that keeps your brain alert.
Cool Your Room Down
Your body needs to drop its core temperature slightly to initiate sleep. A warm room fights this process. The ideal bedroom temperature for sleep is between 60 and 67°F (15 to 19°C), which feels cooler than most people keep their homes during the day. If you can’t control your thermostat precisely, try sticking one foot out from under the covers. Your feet and hands are your body’s main heat radiators, and exposing them helps release warmth.
A warm bath or shower can also help, but the timing matters. Research shows that bathing in water around 104°F (40°C) works best when done one to three hours before bed, not right at bedtime. The warm water dilates blood vessels near your skin’s surface, and when you step out, that extra blood flow rapidly cools your core temperature, creating the drop your body needs. People who bathed in this window fell asleep faster, with a median time to sleep of about 25 minutes compared to 30 minutes for those who didn’t bathe.
Eat a Small Snack if You’re Hungry
Hunger itself can keep you awake, so a small snack is fine. The best options are simple carbohydrates with minimal protein: a piece of toast, a banana, a small bowl of cereal, or a handful of crackers. Carbohydrates help shuttle the amino acid tryptophan into the brain, where it gets converted into serotonin and eventually melatonin. This process works best when carbohydrates make up the vast majority of the snack and protein stays low.
Avoid anything heavy, spicy, or high in fat. A full meal diverts energy to digestion and can cause discomfort when you lie down. And skip the alcohol. While it may make you feel drowsy initially, it fragments sleep later in the night and reduces sleep quality overall.
Consider Magnesium
Magnesium plays a role in regulating the nervous system and supporting sleep. Many people don’t get enough of it through diet alone, and supplementation is generally safe for most adults at doses up to 350 milligrams per day. Above that threshold, side effects like digestive upset become more common. The glycinate form is often recommended for sleep because it’s easier on the stomach, though this won’t solve tonight’s problem since magnesium works best as a daily habit over time rather than a one-night fix.
Know When Sleeplessness Is a Bigger Problem
An occasional bad night is normal. Stress, travel, schedule changes, or a noisy environment can all cause temporary insomnia that resolves on its own. But if you have trouble falling or staying asleep at least three nights per week, and this pattern has lasted three months or longer, it meets the clinical definition of chronic insomnia. At that point, the strategies above still help, but they work best as part of a structured program with a sleep specialist, typically cognitive behavioral therapy for insomnia, which addresses the underlying thought patterns and behaviors that keep the cycle going.

