What to Do When You Can’t Sleep at Night

Lying awake at night is one of the most frustrating experiences in daily life, and the worst part is that frustration itself makes sleep harder to reach. The single most effective thing you can do when you cannot fall asleep is get out of bed after about 15 to 20 minutes and do something low-key in dim light until you feel genuinely drowsy. That advice sounds counterintuitive, but it is the cornerstone of the best-studied insomnia treatment in existence. Beyond that one move, a handful of specific techniques can shift your body and brain from their wired-up state into the zone where sleep actually happens.

Why Lying There Trying Harder Makes It Worse

When you are tossing and turning, everything in your psychology pushes you to stay put and keep trying. But the effort to sleep is itself a form of arousal. Research into the mechanisms of insomnia consistently points to something called hyperarousal: your neurobiological and psychological systems are running too hot for sleep to take hold. This is not just “stress” in the everyday sense. It is a measurable state where your nervous system responds to the sleep situation itself as though it were a stressor, keeping your brain alert precisely when you need it to power down.1Europe PMC. Hyperarousal and sleep reactivity in insomnia: current insights The more you lie there willing yourself to sleep, the stronger the association between your bed and wakefulness becomes. Your bed starts to feel like a place where you worry, not a place where you rest.

This is why the “get out of bed” rule exists. A systematic review of stimulus control therapy found it is an effective intervention for improving insomnia compared to control conditions.2PubMed. The effectiveness of stimulus control in cognitive behavioural therapy for insomnia in adults: A systematic review and network meta-analysis The idea is simple: if you are awake, you should not be in bed. Go to another room, sit in dim light, and read a physical book or do something mildly boring. Return only when your eyelids feel heavy. This retrains your brain to link the bed with sleep rather than with lying awake staring at the ceiling.

Turn the Clock Around

One of the easiest changes you can make tonight costs nothing and takes two seconds: turn your clock away from you, or move your phone out of arm’s reach. Clock-watching while you cannot sleep triggers a cascade of worry. Studies show that people who monitor the time while trying to fall asleep report more pre-sleep worry and take longer to fall asleep, and this holds true for both good sleepers and poor sleepers.3PubMed. Sleeping with the enemy: clock monitoring in the maintenance of insomnia Even worse, clock-watchers overestimate how long they have been lying awake, which amplifies the frustration.

The mechanism is almost comically simple. You check the time, calculate how few hours of sleep you will get if you fall asleep right now, feel anxious about that, and then the anxiety keeps you awake longer. Time monitoring commonly occurs among insomnia patients, often leads to frustration about sleeplessness, and perpetuates insomnia symptoms in a self-reinforcing loop.4The Journal of Nervous and Mental Disease. Nocturnal Time Monitoring Behavior (“Clock-Watching”) in Patients Presenting to a Sleep Medical Center With Insomnia and Posttraumatic Stress Symptoms If you need an alarm, set it and then put the phone face-down across the room. You do not need to know it is 2:47 a.m.

Give Your Brain Something Boring to Chew On

When you cannot sleep, your mind often races through worries, to-do items, or replays of the day. The problem is not thinking per se; it is that the thoughts are emotionally charged and self-referential. One approach is to replace them with something that occupies your mental bandwidth without generating anxiety.

A technique sometimes called the “cognitive shuffle” involves imagining a random, unrelated sequence of objects or scenes: a red mailbox, a dolphin, a kitchen chair, a snowflake. The randomness matters. According to the theory behind serial diverse imagining, cycling through unrelated mental images is predicted to be both sleep-promoting and counter-insomnolent, partly because the brain interprets the lack of narrative coherence as a signal that it is safe to disengage from waking vigilance.5Computational Modeling of Cognition-Emotion Interactions: Relevance to Mechanisms of Affective Disorders and Therapeutic Action. A design-based approach to sleep-onset and insomnia: super-somnolent mentation, the cognitive shuffle and serial diverse imagining

If random images feel too unstructured, a more guided version works well too. Researchers compared insomnia patients who were asked to imagine a relaxing scene (like a beach or a waterfall) with those given no specific instructions. The imagery group fell asleep faster, and the researchers attributed this to the imagery occupying enough cognitive space to prevent the person from drifting back into worry.6PubMed. The management of unwanted pre-sleep thoughts in insomnia: distraction with imagery versus general distraction The common thread is that your mind needs a landing pad. Left to its own devices at 2 a.m., it will land on whatever is most stressful.

Write Your Worries Down Before Bed

If your sleeplessness tends to start with a buzzing mind full of tasks and unresolved problems, offloading those thoughts onto paper before you even get into bed can make a real difference. A polysomnography study found that participants who spent five minutes writing a specific to-do list for the next day fell asleep significantly faster than those who wrote about things they had already completed. The more detailed and specific the to-do list, the faster sleep came.7PubMed Central. The Effects of Bedtime Writing on Difficulty Falling Asleep: A Polysomnographic Study Comparing To-Do Lists and Completed Activity Lists

A related technique, sometimes called “constructive worry,” takes this further. Rather than just listing what is bothering you, you briefly write out a concrete next step for each concern. In a study of college students with insomnia, the constructive-worry group showed decreased pre-sleep cognitive arousal compared to a group that simply worried as usual.8PubMed. Effects of a structured problem-solving procedure on pre-sleep cognitive arousal in college students with insomnia When constructive worry was added to behavioral therapy for insomnia in another trial, the combined approach led to a larger decrease in insomnia severity than behavioral therapy alone.9PubMed. Don’t worry, be constructive: a randomized controlled feasibility study comparing behaviour therapy singly and combined with constructive worry for insomnia The logic is clean: your brain keeps circling unfinished business because it does not want to lose track of it. Once you externalize it, the mental alarm can stand down.

Slow Your Breathing Down

Breathing techniques for sleep get a lot of hype, and some of the specific branded methods (like “4-7-8 breathing”) are more marketing than science. But the underlying principle is well supported: slow, paced breathing shifts your autonomic nervous system from its alert mode toward the calmer branch that facilitates sleep. A study of people with insomnia found that practicing slow, paced breathing for 20 minutes before bed decreased the time it took to fall asleep, reduced the number of awakenings during the night, and increased overall sleep efficiency.10PubMed. Efficacy of paced breathing for insomnia: enhances vagal activity and improves sleep quality

The mechanism involves your vagus nerve, which acts as the brake pedal on your fight-or-flight system. Slow breathing activates that brake. Research shows that even a single session of deep and slow breathing increases vagal tone and lowers anxiety, and this effect is particularly strong in older adults.11Scientific Reports. Benefits from one session of deep and slow breathing on vagal tone and anxiety in young and older adults You do not need a specific count or pattern. Breathe in through your nose for a comfortable few seconds, out through your mouth for a slightly longer count, and repeat. The exhale being longer than the inhale is the part that matters most. After a few minutes, most people notice their heart rate dropping and their muscles loosening. If 20 minutes feels like a lot, even 5 to 10 minutes can start the process.

Try Progressive Muscle Relaxation

If your body feels tense rather than just your mind, progressive muscle relaxation (PMR) gives you something physical to do that actually helps. The technique involves systematically tensing and then releasing muscle groups from your feet to your head. It sounds too simple to work, but there is meaningful evidence behind it. Participants who performed PMR before a nap spent roughly 10 minutes more in deep slow-wave sleep than a control group, which translated to about 125% more time in the most restorative stage of sleep.12Europe PMC. Progressive muscle relaxation increases slow-wave sleep during a daytime nap PMR works partly by giving you a body-focused task that draws attention away from racing thoughts, and partly by physically releasing the muscular tension that accompanies the hyperaroused state.

The process is straightforward. Start with your toes: squeeze them tightly for five seconds, then let go and notice the contrast. Move to your calves, your thighs, your abdomen, your hands, your shoulders, your face. The key is paying attention to the difference between tension and release. Most people who have never tried it are surprised at how much tension they were holding without realizing it.

Take a Warm Shower or Bath Earlier in the Evening

Your body temperature follows a natural cycle, dipping in the evening as part of the signal to sleep. You can amplify that dip by taking a warm shower or bath one to two hours before bed. A systematic review and meta-analysis found that passive body heating in water at about 40 to 42.5°C, when scheduled one to two hours before bedtime, significantly shortened the time it took people to fall asleep.13PubMed. Before-bedtime passive body heating by warm shower or bath to improve sleep: A systematic review and meta-analysis You only need about 10 minutes. The warm water brings blood to the surface of your skin, and after you step out, that blood rapidly radiates heat, causing your core temperature to drop faster than it would on its own.

A large-scale study in older adults confirmed that hot-water bathing before bed was associated with shorter sleep onset and a higher skin temperature gradient, which is the body’s physical indicator that heat is being shed efficiently from the core.14PubMed Central. Hot-water bathing before bedtime and shorter sleep onset latency are accompanied by a higher distal-proximal skin temperature gradient in older adults The timing matters: a bath right before bed does not work as well as one an hour or two earlier, because your body needs time to go through the cooling-off process. Think of it as priming the thermostat rather than as a direct sedative.

Manage Light Before and During the Night

Your body uses light as its primary cue for when to be awake and when to sleep. The problem is that modern life floods your eyes with the exact type of light that tells your brain it is daytime. Blue-wavelength light, which dominates phone screens, laptop displays, and many LED bulbs, suppresses melatonin in a dose-dependent fashion.15PubMed. Blue light from light-emitting diodes elicits a dose-dependent suppression of melatonin in humans When researchers compared blue light exposure to red light over several hours, blue light maintained melatonin suppression while red light allowed melatonin to recover substantially.16PubMed Central. Comparative Effects of Red and Blue LED Light on Melatonin Levels During Three-Hour Exposure in Healthy Adults

In practical terms, a randomized crossover study found that using a blue-light-emitting smartphone at night decreased sleepiness and delayed the body’s melatonin timing.17PubMed. Effects of smartphone use with and without blue light at night in healthy adults: A randomized, double-blind, cross-over, placebo-controlled comparison The fix does not require total darkness from sunset onward. Most of the benefit comes from dimming your environment in the last hour or two before bed and avoiding screens. If you must use a phone, enable the warm-light or “night shift” mode. If you wake up in the middle of the night and need to navigate, use a dim red or amber nightlight rather than flipping on a bathroom light. Every burst of bright, blue-rich light resets part of your brain’s bedtime countdown.

What You Eat and Drink Matters More Than You Think

Eating a full meal close to bedtime is one of those things people do regularly without connecting it to their sleep trouble. Data from the American Time Use Survey found that people who ate or drank less than an hour before bed were more than twice as likely to report waking up during the night compared to those who did not.18PubMed Central. Associations between bedtime eating or drinking, sleep duration and wake after sleep onset: findings from the American time use survey As the gap between eating and bedtime widened, the odds of nighttime waking decreased. You do not need to eat dinner at 5 p.m., but giving your body two to three hours to handle digestion before you lie down reduces the chance of disrupted sleep.

Alcohol deserves special attention because it is the sleep aid people reach for most often, and it is the most deceptive. A drink or two in the evening does shorten the time it takes to fall asleep and increases deep slow-wave sleep in the first half of the night. But that sedative effect reverses partway through. Research shows that following a moderate dose of alcohol, the second half of the night features rebound effects: more light, fragmented sleep and disrupted sleep architecture.19PubMed. Effects of alcohol on polysomnographically recorded sleep in healthy subjects You fall asleep faster but sleep worse overall. If you find yourself waking at 3 or 4 a.m. feeling alert and restless, evening alcohol is a likely contributor.

Caffeine Lingers Longer Than You Expect

Most people know that coffee before bed is a bad idea. What catches them off guard is how long caffeine stays active. Caffeine’s half-life in the average adult is roughly five to six hours, meaning that half the caffeine from a 3 p.m. coffee is still circulating in your bloodstream at 8 or 9 p.m. For some people, particularly those who metabolize caffeine slowly due to genetic variation in liver enzymes, the half-life can stretch to eight hours or more. Caffeine works by blocking adenosine receptors, and adenosine is the molecule your brain accumulates throughout the day to build “sleep pressure.”20Europe PMC. Adenosine, caffeine, and sleep-wake regulation: state of the science and perspectives When caffeine blocks those receptors, the sleepiness signal cannot get through even if you have been awake for 16 hours. A reasonable cutoff for most people is early-to-mid afternoon, though if you are sensitive you may need to stop earlier.

The Supplement and Sleep Aid Question

When sleepless nights become frequent, many people reach for melatonin, magnesium, antihistamines, or herbal supplements. The evidence is decidedly mixed. A double-blind trial found that a combination of melatonin, magnesium, and zinc significantly improved sleep quality scores in older adults living in long-term care facilities, with better ease of falling asleep, sleep quality, and next-morning alertness compared to placebo.21PubMed. The effect of melatonin, magnesium, and zinc on primary insomnia in long-term care facility residents in Italy: a double-blind, placebo-controlled clinical trial But that study involved elderly residents of care homes, a population that may respond differently than younger, healthier adults. Melatonin on its own is not really a sleeping pill; it signals to your brain that darkness has arrived. It tends to be most useful for circadian misalignment (jet lag, shift work, or a delayed internal clock) rather than for garden-variety insomnia where your clock is fine but your brain will not quiet down.

Over-the-counter antihistamines like diphenhydramine (the active ingredient in many “PM” branded sleep aids) do cause drowsiness, but they come with real downsides. Studies of OTC sleep aids have inconsistent results regarding both effectiveness and safety, and common problems include tolerance, dependency, and side effects like next-day grogginess and dry mouth.22Academia.edu. Over-the-Counter Sleep Aid Medications and Insomnia Your body builds tolerance quickly, meaning the dose that knocked you out the first time stops working within a few days. These are reasonable for an occasional bad night, but they are not a solution for ongoing trouble sleeping.

When the Problem Is Waking Up at 3 a.m., Not Falling Asleep

Not all sleeplessness looks the same. Some people cannot fall asleep in the first place (sleep-onset insomnia), while others fall asleep fine but wake up in the middle of the night and cannot get back to sleep (sleep-maintenance insomnia). The strategies overlap but are not identical. Research comparing the two types shows differences in brain-wave activity around the point of falling asleep, with maintenance insomnia involving higher alpha-wave power before sleep onset, a pattern associated with a lighter, more alert resting state.23PubMed. Spectral analysis of the sleep onset period in primary insomnia

If your pattern is middle-of-the-night waking, the “get out of bed” rule still applies, but the causes you should investigate are slightly different. Alcohol rebound, as described earlier, is a common culprit. So is eating too close to bedtime. Sleep apnea and other breathing-related disorders tend to cause maintenance insomnia rather than trouble falling asleep. And for some people, early-morning waking (especially with racing or dark thoughts) can be a sign of depression rather than a standalone sleep issue. If you consistently wake between 3 and 5 a.m. and feel wired, anxious, or hopeless, it is worth mentioning to a doctor even if you would not otherwise describe yourself as depressed.

Using Sound to Mask Disruptions

If your environment is noisy, whether from traffic, a partner who snores, or a building that creaks, background sound can help. A crossover pilot study found that continuous pink noise played at 45 decibels significantly reduced the sleep-fragmenting effect of traffic noise events, slowing the brain’s shift toward wakefulness and lowering peak arousal levels compared to nights without the masking sound.24Communications Medicine. Pink noise reduces impact of traffic noise on sleep and the blood metabolome: a cross-over pilot study Pink noise sounds like a deeper, more even version of white noise, similar to steady rainfall or a fan. The key insight from the research is that it works by masking sudden noise events that would otherwise jolt you into a lighter sleep stage. It does not make you sleep more deeply; it prevents the environment from waking you up.

If you try a sound machine or a fan, set it at a consistent volume and let it run all night. Sounds that stop partway through the night can themselves become a disruption when your brain notices the change. Earbuds designed for sleep are another option, though some people find them uncomfortable. The goal is a steady, uninteresting sound floor that smooths over the spikes.

The Paradox of Letting Go

There is a strange irony at the heart of sleeplessness: the harder you try to sleep, the more awake you become. Sleep researchers sometimes call this “sleep effort,” and it is one of the reasons insomnia can feel so maddening. You are doing everything “right” and still lying there wide awake. Acceptance-based approaches to insomnia, drawing from acceptance and commitment therapy, take a different tack. Rather than fighting wakefulness, you practice noticing it without judgment and letting go of the need to control whether sleep happens.25Europe PMC. Acceptance and Commitment Therapy as an Adjunct or Alternative Treatment to Cognitive Behavioral Therapy for Insomnia This is not the same as giving up. It is recognizing that sleep is an involuntary process and that your conscious effort to force it is the thing getting in the way.

In practice, this means lying in bed (or sitting in your dim-lit living room) and simply noticing the sensations in your body and the thoughts passing through your mind without engaging with them. You do not try to stop thinking. You do not try to relax. You just observe, the way you might watch clouds pass. For people who have spent weeks or months clenching their way through bedtime, this shift in stance can be surprisingly effective once the skill develops. It takes practice, though, and it pairs well with the behavioral strategies described above rather than replacing them.