If you can’t fall asleep, the single most effective thing you can do right now is stop trying. Lying in bed willing yourself to sleep creates a cycle of frustration that pushes sleep further away. The techniques below work both tonight and over the long term, starting with what you can do in the next five minutes.
Get Out of Bed if You’ve Been Lying There
Stanford Health Care’s clinical recommendation for sleeplessness is straightforward: if you can’t fall asleep within roughly 20 minutes, get up. Go to another room, do something quiet and low-stimulation (reading a physical book, gentle stretching, listening to calm music), and only return to bed when you feel genuinely sleepy again. This applies whether you’re struggling at the start of the night or waking up at 3 a.m.
The logic is simple. Your brain learns by association. If you spend hours tossing and turning, your brain starts linking the bed with wakefulness and anxiety. By reserving the bed for sleep only, you retrain that association over time. Even on the first night, getting up breaks the frustration spiral and gives your body a chance to build up enough sleep pressure to actually drift off.
Try the Opposite: Stop Trying to Sleep
This sounds counterintuitive, but it has solid clinical backing. A technique called paradoxical intention flips the goal: instead of trying to fall asleep, you try to stay awake. Lie comfortably in bed with the lights off, but keep your eyes open. Don’t do anything stimulating. Just gently resist the urge to let your eyelids close. When they feel heavy, tell yourself, “I’ll just stay awake another couple of minutes.”
The reason this works is that much of sleeplessness is driven by performance anxiety. The harder you try to sleep, the more alert you become. By giving up the effort entirely and shifting your focus away from falling asleep, you remove the tension that was keeping you awake. Sleep then arrives on its own. If you wake during the night, you can use the same approach: lie still, eyes open, no effort to force sleep.
Use Your Breathing to Calm Your Nervous System
When you’re lying awake with a racing mind, your body’s stress response is likely activated. Controlled breathing directly triggers the relaxation side of your nervous system, slowing your heart rate and lowering the alertness that keeps you up. The 4-7-8 technique is one of the most widely recommended methods:
- Inhale through your nose for 4 counts
- Hold your breath for 7 counts
- Exhale slowly through your mouth for 8 counts
Repeat this for three or four cycles. The extended exhale is the key part. Breathing out longer than you breathe in signals your body to shift from alertness into calm. You don’t need to do it perfectly. Even just slowing your breathing and extending each exhale will help. If the 7-count hold feels uncomfortable, shorten it. The point is the slow, rhythmic pattern, not hitting exact numbers.
Check Your Room Temperature
Your body needs to drop its core temperature slightly to initiate and maintain sleep. A room that’s too warm is one of the most common and easily fixable sleep disruptors. The recommended bedroom temperature for adults is 60 to 67°F (15 to 19°C). This range helps stabilize REM sleep, which is the phase most sensitive to heat.
If you don’t have precise control over your thermostat, you can still make adjustments. Open a window, use a fan, switch to lighter bedding, or try sleeping with one foot outside the covers (your feet are effective heat radiators). Even a small drop in room temperature can make a noticeable difference.
Screens Are Costing You More Than You Think
Scrolling your phone while you can’t sleep feels harmless, but it actively delays your ability to fall asleep. In one study, two hours of exposure to an LED screen suppressed the body’s sleep hormone production by 55% and delayed its natural release by an hour and a half compared to reading a printed book under dim light. That hormone is what tells your brain it’s time for sleep, and bright screens effectively hit the pause button on it.
If you’re reading this article on your phone right now, that’s fine, but dim your screen as much as possible and switch to something non-screen-based once you’ve finished. If you use your phone as an alarm, turn it face down or enable a red-tinted night mode. The goal is to avoid bright, blue-toned light in the hour before you want to sleep.
What You Did Earlier Today Matters
If sleeplessness is becoming a pattern, look at your daytime habits. Caffeine has a half-life of 5 to 6 hours, meaning that if you drink a coffee at 4 p.m., roughly half the caffeine is still circulating in your system at 10 p.m. And that’s only the halfway point. It can take considerably longer to clear entirely. A reasonable cutoff for most people is early afternoon, though if you’re especially sensitive, noon or earlier may be necessary.
Alcohol is another common culprit. It may help you fall asleep initially, but it fragments sleep in the second half of the night, which is why you might wake at 2 or 3 a.m. after evening drinks. Exercise helps sleep quality significantly, but intense workouts within two to three hours of bedtime can leave your body too activated to wind down.
Melatonin: What Actually Helps
Melatonin supplements can be useful, but most people take too much. The recommended starting dose is just 1 mg, increasing by 1 mg per week if needed, up to a maximum of 10 mg. Higher doses aren’t more effective and can actually backfire. Taking too much melatonin, or taking it too late in the evening, can cause next-day grogginess and sluggishness. In some cases, high doses can gradually worsen insomnia rather than improve it.
Melatonin works best for adjusting your sleep timing (jet lag, shift work, a schedule that’s drifted late) rather than as a general knockout pill. Take it 30 to 60 minutes before your target bedtime. If you’ve been using it nightly for weeks without improvement, it’s likely not addressing the root cause of your sleep problem.
Magnesium glycinate is another supplement that has gained attention for sleep. Clinical trials have used doses around 500 mg taken at night. Magnesium plays a role in muscle relaxation and nervous system regulation, and many people are mildly deficient without knowing it. It’s generally well tolerated, though it can cause digestive issues at high doses.
When Sleeplessness Becomes a Bigger Problem
Everyone has occasional bad nights. But if you’re struggling to fall asleep or stay asleep at least three nights per week, and this has been going on for a month or more, that meets the clinical threshold for insomnia. At that point, your sleep problem is unlikely to resolve on its own with basic tips alone.
The most effective treatment for chronic insomnia isn’t medication. It’s a structured program called cognitive behavioral therapy for insomnia (CBT-I), which addresses the mental and behavioral patterns that keep insomnia going. Unlike sleep medications, which relieve symptoms temporarily, CBT-I targets the underlying causes. Sleep medications can help during acute periods of stress or grief, but they rarely resolve insomnia completely on their own, and many people worry about becoming dependent on them.
CBT-I typically involves the techniques described in this article (stimulus control, sleep scheduling, relaxation training) delivered in a structured way over several weeks. You can access it through a therapist who specializes in sleep, or through validated digital programs that guide you through the process on your own. Most people see meaningful improvement within four to eight sessions.

