If you’re lying in bed unable to fall asleep, 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 wakefulness, making the problem worse over time. Get out of bed after about 10 to 15 minutes of not sleeping, move to another room, and do something quiet and relaxing until you feel drowsy. Then go back to bed and try again. This technique, called stimulus control, is one of the most well-supported strategies in sleep medicine.
Beyond that one immediate step, there’s a lot you can do tonight and in the coming weeks to fix your sleep. Here’s what actually works, starting with what you can try right now.
Calm Your Nervous System With Breathing
When you can’t sleep, your body is often stuck in a low-level fight-or-flight state. Your heart rate is slightly elevated, your muscles are tense, and your mind is scanning for problems. Controlled breathing directly counters this by activating the part of your nervous system responsible for calming you down.
The 4-7-8 technique is simple and effective. Inhale through your nose for four counts, hold your breath for seven counts, then exhale slowly through your mouth for eight counts. The long exhale is the key: it forces your body to shift toward relaxation. Repeat the cycle three or four times. You don’t need to do it perfectly. The goal is to slow your breathing enough that your body gets the message it’s safe to wind down.
Release Physical Tension With Muscle Relaxation
You may not realize how much tension you’re holding in your body until you deliberately let it go. Progressive muscle relaxation works by tensing and then releasing each muscle group in sequence, starting from your fists and working down through your biceps, shoulders, jaw, stomach, thighs, and calves. The whole process takes about 10 to 15 minutes lying down.
For each muscle group, squeeze tightly for about five seconds, then release and notice the contrast. The relief you feel when you let go is the point. By the time you’ve worked through your whole body, your muscles are genuinely looser and your nervous system has shifted gears. Many people fall asleep before they finish the sequence.
Get Out of Bed If You’re Still Awake
This one feels counterintuitive, but it’s backed by decades of research. If you’ve been lying in bed for 10 to 15 minutes without falling asleep, get up and go to a different room. The reason is straightforward: your brain learns by association. If you spend long stretches awake in bed, your brain starts treating the bed as a place for wakefulness, worry, or frustration. Over time, just getting into bed can make you feel more alert.
When you get up, keep the lights dim and do something low-key. Reading with a small lamp or watching television from across the room are both fine. Avoid your phone or computer, since the screen brightness at close range is more stimulating than most people realize, and the activities themselves (scrolling, checking email) tend to be arousing. Go back to bed only when you feel genuinely sleepy. If you don’t fall asleep within another 10 to 15 minutes, get up again. This process retrains the association between your bed and sleep.
Fix Your Bedroom Environment
Temperature matters more than most people think. Your body needs to cool down slightly to initiate sleep, and a warm room works against that process. The ideal bedroom temperature is around 18°C (65°F), with a comfortable range between 15.6°C and 20°C (60°F to 68°F). If you tend to run hot, err on the cooler side and use blankets you can easily push off.
Darkness is equally important. Even dim light from a hallway or an LED on a device can interfere with your body’s production of melatonin, the hormone that signals it’s time to sleep. Blackout curtains or a sleep mask can make a noticeable difference, especially if you live in an area with streetlights or early sunrises.
Cut Caffeine Earlier Than You Think
Caffeine has a half-life of four to six hours. That means if you drink a cup of coffee at 4 p.m., half the caffeine is still circulating in your body at 10 p.m. The other half doesn’t disappear either; it takes several more hours to fully clear. Many people who “can’t sleep” are unknowingly still running on afternoon caffeine.
A good cutoff is around 2 or 3 p.m. for anyone with a standard evening bedtime. This applies to all caffeine sources: coffee, tea, energy drinks, pre-workout supplements, and even dark chocolate in large amounts. If you’re particularly sensitive to caffeine, you may need to push that cutoff even earlier.
Put Screens Away Two to Three Hours Before Bed
Bright screens suppress melatonin production, and the effect isn’t subtle. Harvard Health recommends avoiding bright screens two to three hours before bed to give your body time to ramp up melatonin naturally. That’s a big ask for most people, so even scaling back gradually helps. Switching to a dimmer setting, using night mode, or simply putting your phone in another room an hour before bed is a meaningful step.
The content on the screen matters too. Scrolling social media or reading the news keeps your brain engaged and alert. If you need something to do before bed, a physical book or a podcast you find relaxing is a better choice.
Melatonin and Magnesium Supplements
Melatonin can help with short-term sleep problems, but the dose matters. Many over-the-counter melatonin products contain 5 or 10 mg, which is far more than needed. The NHS recommends a starting dose of just 2 mg, taken one to two hours before bedtime for short-term insomnia or 30 minutes to an hour before bed for longer-term sleep difficulties. Higher doses don’t necessarily work better and can leave you groggy the next morning.
Magnesium supplements have also shown modest benefits for sleep quality. A pilot trial published in Medical Research Archives found improvements in sleep quality with daily magnesium supplementation over two weeks. Magnesium plays a role in muscle relaxation and nervous system regulation, which may explain why some people find it helpful. Magnesium glycinate is the form most commonly recommended for sleep because it’s less likely to cause digestive side effects.
When Sleepless Nights Become a Pattern
A rough night here and there is normal. Chronic insomnia is something different. Clinically, insomnia is defined as difficulty falling asleep, staying asleep, or waking too early, happening at least three nights per week for three months or longer, despite having adequate opportunity to sleep. If that sounds like you, the strategies above will help, but you’ll likely benefit from a more structured approach.
Cognitive behavioral therapy for insomnia (CBT-I) is the gold standard treatment. It combines the techniques described above, like stimulus control and relaxation training, with two additional components. Sleep restriction temporarily limits your time in bed to build stronger sleep drive, then gradually expands it as your sleep becomes more consistent. Cognitive therapy helps you identify and change the anxious thoughts about sleep that often keep the cycle going (“I’ll never fall asleep,” “Tomorrow will be ruined”).
The results are strong. Seven to eight out of ten people who go through CBT-I see significant improvement in their sleep. Unlike sleeping pills, which are designed for short-term use and often lose effectiveness over time, CBT-I produces lasting changes. Many therapists offer it in four to eight sessions, and online CBT-I programs are also available if in-person therapy isn’t accessible.
Building Better Sleep Habits Over Time
The techniques that help you fall asleep tonight are also the building blocks of long-term sleep health. A few additional habits compound over weeks:
- Keep a consistent wake time. Your internal clock anchors to when you wake up more than when you go to bed. Waking at the same time every day, even on weekends, strengthens your sleep drive and makes falling asleep easier.
- Reserve your bed for sleep. Working, eating, scrolling, or watching TV in bed weakens the mental link between your bed and sleep. The stronger that association, the faster you’ll fall asleep when you lie down.
- Don’t try to force sleep. Effort is the enemy of sleep. The harder you try to fall asleep, the more alert you become. Focus instead on creating the right conditions and letting sleep come to you.
- Limit naps to 20 minutes before 3 p.m. Long or late naps reduce sleep pressure, making it harder to fall asleep at night.
Sleep problems are frustrating partly because they feel so out of your control. But the research consistently shows that changing your behavior around sleep, not just willing yourself to sleep, is what produces results. Start with one or two changes tonight and build from there.

