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

If you can’t fall asleep, the single most effective thing you can do right now is get out of bed. It sounds counterintuitive, but lying there willing yourself to sleep actually makes the problem worse. The longer you stay in bed awake, the more your brain starts associating your bed with frustration and alertness instead of rest. Below are techniques you can use tonight, plus longer-term fixes if this keeps happening.

Get Out of Bed After 15 to 20 Minutes

This is the foundation of what sleep specialists call stimulus control, and it’s one of the most well-supported techniques in sleep medicine. The idea is simple: your bed should only be linked with sleep in your brain. When you lie awake tossing and turning, you’re training your brain to associate the bed with wakefulness, anxiety, and clock-watching. That association gets stronger every night you repeat it.

Here’s what to do instead. If you’ve been lying there for roughly 15 to 20 minutes without falling asleep, get up and go to another room. Don’t check the clock obsessively to time it; just estimate. Do something quiet and low-stimulation: read a physical book, listen to a calm podcast, fold laundry. Keep the lights dim. Then return to bed only when you feel genuinely sleepy, not just tired. If you get back in bed and can’t fall asleep again, repeat the process. Stanford’s Sleep Health and Insomnia Program notes that sticking with this routine consistently retrains your brain to connect bed with falling asleep quickly.

This also applies if you wake up in the middle of the night. The same rule holds: if you’re lying there awake and starting to feel frustrated, get up.

Try a Breathing Technique in Bed

Before you get up, or after you return to bed feeling sleepy, a structured breathing exercise can help your body shift out of its alert state. The 4-7-8 method is one of the most commonly recommended. Inhale through your nose for four counts, hold your breath for seven counts, then exhale slowly through your mouth for eight counts. Repeat three or four cycles.

The reason this works is physiological. When you can’t sleep, your body’s stress response is often running in the background: slightly elevated heart rate, shallow breathing, restless energy. The long exhale in 4-7-8 breathing activates your parasympathetic nervous system, which is essentially the counterbalance to that stress response. It slows your heart rate and signals your body that it’s safe to relax. It won’t knock you out instantly, but it lowers the baseline tension that keeps you awake.

Stop Trying to Fall Asleep

This one sounds like a paradox, and it is. Sleep researchers at the University of Pennsylvania have studied a technique called paradoxical intention, where the goal flips entirely: instead of trying to sleep, you try to stay awake. Lie comfortably in bed with the lights off, keep your eyes open, and give up any effort to fall asleep. When your eyelids get heavy, gently tell yourself to stay awake just a couple more minutes.

The mechanism is straightforward. Sleep is an involuntary process. The harder you try to force it, the more performance anxiety you create, and that anxiety is exactly what keeps you awake. By giving yourself permission to stay awake, you remove the pressure. Most people find that sleep arrives on its own once they stop chasing it. This technique works well for people who get into bed already dreading another sleepless night.

The Military Sleep Method

This technique, popularized by its use in military training, is a progressive muscle relaxation routine that claims to help you fall asleep in two minutes. No formal studies have validated the two-minute claim, but the underlying approach (systematically relaxing your muscles) has solid support in sleep research.

Lie on your back and close your eyes. Start at your forehead and consciously relax each part of your body, working downward: your jaw, your neck, your shoulders, your arms, your chest, your stomach, your legs, all the way to your toes. Spend a few seconds on each area. Pay attention to where you’re holding tension and mentally release it. After your body feels fully relaxed, clear your mind by imagining a calm scene or repeating a simple word to yourself. The technique takes practice. It may not work well the first night, but people who use it regularly report faster sleep onset over time.

Fix Your Sleep Environment

Temperature is one of the biggest sleep disruptors that people overlook. Your body needs to cool down slightly to initiate and maintain sleep, particularly during the deep, restorative phases. Sleep experts recommend keeping your bedroom between 60 and 67°F (15 to 19°C). If your room is warmer than that, your body may struggle to reach the temperature drop it needs. A fan, lighter bedding, or simply cracking a window can make a noticeable difference.

Beyond temperature, think of your bedroom as a cave: cool, dark, and quiet. Blackout curtains or a sleep mask block light that can suppress your natural melatonin production. Earplugs or a white noise machine help if you’re sensitive to sound. And keep screens out of the bedroom entirely if you can. Using your phone or laptop in bed strengthens the mental association between your bed and wakefulness, the exact opposite of what you want.

Supplements That May Help

Melatonin is the most widely used sleep supplement, and it works best for people whose sleep timing is off rather than people who are anxious or wired at night. Melatonin doesn’t sedate you; it signals to your brain that it’s time for sleep. The NHS recommends a 2mg slow-release dose taken one to two hours before bedtime for short-term sleep problems. Many over-the-counter melatonin products contain 5 or 10mg, which is more than most people need and can cause grogginess the next day. Starting low is generally a better approach.

Magnesium is another popular option. Magnesium oxide has the most research behind it for sleep, studied at doses ranging from 250 to 729mg daily. Magnesium glycinate is often marketed as the best form for sleep because it contains glycine, an amino acid linked to relaxation, but the evidence for it remains modest. Magnesium citrate showed little difference from a placebo in at least one trial. Neither form has strong enough evidence to be considered a reliable sleep fix on its own, but some people find magnesium helpful as part of a broader routine.

What to Do During the Day

What you do in the hours before bed matters as much as what you do once you’re lying there. Caffeine has a half-life of about five to six hours, meaning half the caffeine from your afternoon coffee is still circulating in your system at bedtime. If you’re sensitive to it, cutting off caffeine by noon or early afternoon can help.

Exercise improves sleep quality, but timing matters. Vigorous exercise within two to three hours of bedtime can leave your body too activated to settle down. Morning or afternoon workouts tend to be more beneficial for sleep. Consistent wake times also play a major role. Your body’s internal clock relies on regularity, and waking up at the same time every day (even on weekends) strengthens your natural sleep drive so that by nighttime, the pressure to sleep is strong enough to pull you under.

Avoid napping if you’re struggling with nighttime sleep. Naps reduce that built-up sleep pressure, making it harder to fall asleep at your target bedtime.

When Sleeplessness Becomes Chronic Insomnia

An occasional rough night is normal. It becomes a clinical problem when you have trouble falling asleep, staying asleep, or waking too early at least three nights per week for a month or longer. At that point, the standard diagnostic criteria for insomnia are met, and self-help techniques alone may not be enough.

The gold-standard treatment is Cognitive Behavioral Therapy for Insomnia, often abbreviated CBT-I. It combines the stimulus control and sleep scheduling techniques described above with cognitive therapy, where a therapist helps you identify and reshape the anxious thought patterns that fuel insomnia. It also includes sleep restriction, a structured approach where you temporarily limit your time in bed to match the amount of sleep you’re actually getting, then gradually expand it as your sleep efficiency improves. CBT-I is more effective than sleeping pills for long-term insomnia and doesn’t carry the risk of dependence. Many therapists offer it in four to eight sessions, and digital CBT-I programs are available for people who prefer to work through it independently.