What to Do When You Can’t Sleep: Tips That Work

If you’re lying in bed unable to fall asleep, the single most effective thing you can do 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 after getting up, and what you change during the day, can dramatically improve how quickly you fall asleep tonight and in the weeks ahead.

Get Out of Bed

This feels counterintuitive, but it’s the foundation of the most effective insomnia treatment available: stimulus control therapy, a core component of cognitive behavioral therapy for insomnia. The idea is simple. Your bed should only be associated with sleep. If you’ve been lying awake for roughly 15 to 20 minutes, get up and move to another room.

Once you’re up, do something low-key and slightly boring. Good options include reading a physical book or magazine, folding laundry, making a grocery list, journaling, doing gentle stretches, knitting, or listening to calm music. The activity should keep your hands or mind lightly occupied without being stimulating. Avoid your phone, laptop, or TV. Return to bed only when you feel genuinely sleepy, not just tired. If you get back into bed and still can’t sleep after another 15 to 20 minutes, get up again. Repeat as many times as needed. It can feel painful the first few nights, but within a week or two most people notice a real shift.

Slow Your Breathing Down

When you can’t sleep, your nervous system is often stuck in a slightly activated state, even if you don’t feel particularly anxious. Slow, structured breathing is one of the fastest ways to shift your body toward its rest-and-digest mode.

The 4-7-8 technique is a good starting point: breathe in through your nose for a count of four, hold for seven, and exhale slowly through your mouth for eight. The key detail is that the exhale is longer than the inhale. This activates the vagus nerve, which runs from your brainstem to your abdomen and acts as the main switch for your parasympathetic nervous system. The result is a lower heart rate, relaxed muscles, and a body that’s actually ready to sleep. Do three or four cycles and see how you feel. If counting feels stressful, simply focus on making each exhale noticeably longer than each inhale.

Try Cognitive Shuffling

Racing thoughts are one of the most common reasons people can’t fall asleep. Cognitive shuffling is a technique designed to interrupt that loop by giving your brain something to do that’s just engaging enough to block anxious thinking, but too random and boring to keep you awake.

Pick a neutral word with no emotional significance, like “garden.” For each letter, visualize a random object that starts with that letter. G: a guitar. A: an airplane. R: a rainbow. D: a domino. E: an elevator. N: a nest. Spend a few seconds on each image, making it vivid. Picture the texture of the guitar strings, the color of the airplane, the smell of the nest. Then pick another word and repeat. The randomness is the point. Your brain can’t build a coherent worry narrative when it’s busy picturing unrelated objects, and the low cognitive effort mimics the drifting quality of pre-sleep thinking. Many people don’t make it past two or three words before falling asleep.

Set Up Your Bedroom for Sleep

Your environment matters more than most people realize, and temperature is the biggest factor. Your body needs to drop its core temperature slightly to initiate and maintain deep sleep. The ideal bedroom temperature is between 60 and 67°F (15 to 19°C). This range helps stabilize both deep slow-wave sleep, which is the most physically restorative stage, and REM sleep, where dreaming and memory consolidation happen. If your room is warmer than that, even a fan or lighter blankets can help.

Darkness is the other non-negotiable. Light in the blue wavelength range (around 446 to 477 nanometers) suppresses melatonin, the hormone that signals your brain it’s time to sleep. This is exactly the light emitted by phone screens, tablets, and LED bulbs. Research shows that blue light at intensities as low as about 19 lux, roughly the brightness of a dim phone screen at arm’s length, can significantly reduce melatonin levels. Brighter screens are worse. If you’re using a device within an hour or two of bedtime, use a red-shift or night mode filter. Better yet, switch to a physical book and a dim, warm-toned lamp.

Watch Your Caffeine Timing

Caffeine doesn’t just make you feel alert. It physically blocks the sleep-promoting receptors in your brain that normally respond to a molecule called adenosine. As adenosine builds up throughout the day, it creates sleep pressure, that mounting heaviness that makes you ready for bed. Caffeine mimics adenosine’s shape and sits in those receptors without activating them, so the sleepiness signal never arrives.

The half-life of caffeine is four to six hours. That means if you drink a cup of coffee at 3 p.m., half the caffeine is still circulating at 9 p.m. For some people, especially slow metabolizers, that’s enough to delay sleep onset significantly. A reasonable cutoff for most adults is early to mid-afternoon. If you suspect caffeine is part of your problem, try moving your last cup to before noon for a week and see what changes.

Supplements That May Help

Melatonin is the most widely used sleep supplement, but it works differently than most people think. It doesn’t sedate you. It signals to your brain that it’s nighttime, which is why timing matters more than dose. A low dose of around 2 mg, taken one to two hours before your intended bedtime, is a reasonable starting point for short-term use. The NHS recommends limiting melatonin use to one to four weeks for sleep problems, with a maximum of 13 weeks unless directed otherwise. Taking it right at bedtime or in large doses doesn’t make it more effective and can leave you groggy the next morning.

Magnesium is another option with emerging support. It plays a role in regulating the neurotransmitters involved in calming your nervous system. One pilot trial found that adults with poor sleep quality who took 1 gram of supplemental magnesium daily for two weeks showed improvements in both sleep quality and mood compared to placebo. The glycinate form is often recommended because it’s well absorbed and less likely to cause digestive side effects. Results tend to build over days to weeks rather than working on the first night.

When It Happens Regularly

An occasional sleepless night is normal and not a cause for concern. But if you’re struggling to fall or stay asleep at least three nights per week for a month or longer, that meets the clinical threshold for insomnia. At that point, the problem is unlikely to resolve on its own with a single tip or trick.

The gold-standard treatment is cognitive behavioral therapy for insomnia, often abbreviated as CBT-I. It’s a structured program, typically four to eight sessions, that combines the stimulus control techniques described above with sleep restriction (temporarily limiting time in bed to build stronger sleep drive), cognitive restructuring (addressing the anxious thoughts that fuel insomnia), and sleep hygiene education. It outperforms sleep medications in long-term studies and, unlike pills, the benefits last after you stop. Many therapists offer it virtually, and there are validated digital programs available if in-person therapy isn’t accessible.