Skip to main content
Snerva

ARTICLE

What to do when you can't sleep at 3am

A science-based protocol for the next thirty minutes, the rest of tonight, and the rest of your nights.

It's some hour between two and four in the morning. You've been awake for a while now — long enough to know that the easy version of this night isn't coming back. You picked up your phone, you typed the obvious thing, and you ended up here.

This page isn't going to tell you to count sheep, take a warm bath, or stop drinking coffee. You already know those things, and they aren't what's keeping you awake. What follows is the actual protocol clinicians use for middle-of-night waking: what to do in the next thirty minutes, what to do with the rest of tonight, and what to do over the next few weeks if this is a pattern rather than a single bad night.

A night's sleep cycles broken by an awakening in the small hours
Marco Diversi
By Marco Diversi · Founder of SnervaPublished May 13, 2026

Right now: what to do in the next thirty minutes

If you've been awake more than twenty minutes, the most useful thing you can do right now is get out of bed. This is counterintuitive and it is the cornerstone of every evidence-based protocol for middle-of-night waking. The technique has a name — stimulus control — and it has more clinical support than any other behavioral intervention for chronic insomnia.

Specifically:

  • Leave the bed. Go to another room if you can. If you can't, at least sit up out of bed.
  • Keep the light low. A single dim lamp is enough. Do not turn on overhead lights.
  • No screens. Not your phone, not your laptop, not the TV. Not even in dark mode — the issue isn't only blue light, it's the cognitive arousal that comes with content.
  • Do something boring. A printed book read in low light is best. An audiobook played quietly in a dim room is acceptable. The goal is occupied-but-not-stimulated.
  • Do not look at the clock. Cover it, turn it away, or remove it from sight. Clock-watching is the single most reliable way to amplify the arousal that's keeping you awake.
  • Return to bed only when you feel sleepy. Not when you think you 'should' try again. If 'sleepy' doesn't arrive for an hour, fine — stay up for that hour.
  • If you wake again twenty minutes later, do it again. It's not a failure; it's the protocol working.

Why this works

The bed is supposed to be associated, in your nervous system, with sleep. When you lie awake in bed night after night, you build the opposite association: bed equals frustration, vigilance, and trying. The longer you stay in bed awake, the more strongly that association compounds. Stimulus control breaks it. By only being in bed when you are actually sleeping, you let the bed-sleep association rebuild. The first few nights are uncomfortable. The fourth and fifth are usually better.

What not to do

  • Don't lie in bed 'trying' to sleep. Trying is itself a form of arousal.
  • Don't check your phone for the time, even briefly. Use a watch you don't have to look at, or just don't know.
  • Don't doomscroll, even with the brightness all the way down. The content is the problem, not just the light.
  • Don't drink a glass of water unless you genuinely need it. You'll create a bathroom wake-up two hours from now.
  • Don't catastrophize about tomorrow. You will function. Humans function on bad nights all the time. The catastrophizing makes tonight worse, not tomorrow better.

Why this is happening: the mechanism

Most middle-of-night waking falls into one of three patterns. They feel similar from the inside, and they need different long-term strategies. Recognizing which one is yours is the difference between a protocol that works and a year of generic advice that doesn't.

The three common patterns:

Sleep-maintenance insomnia (hyperarousal pattern)

This is the most common cause of consistent 3am waking. Your sleep is happening, but your nervous system never fully descends into the deep, consolidated state it's supposed to occupy in the second half of the night. Heart rate stays elevated. Cortisol begins ramping early. You're sleeping shallowly enough that any small signal — a noise, a thought, a temperature shift — pulls you back into wakefulness, and the alertness that follows is disproportionate to the signal.

Circadian misalignment

Your internal clock and your external schedule disagree. You may not be 'waking up' so much as your body deciding it's morning hours before your alarm. If you've noticed that on free days you sleep through this 3am window, but on workdays you wake then, the cause is probably timing rather than insomnia. We have a separate piece on circadian rhythm misalignment that goes into the protocols.

Anxiety-driven waking

Chronic stress and untreated anxiety produce a measurable shift in the cortisol curve — the natural early-morning rise begins earlier and steeper than it should. The result is a sympathetic-nervous-system spike right around 3-4am that wakes you with a feeling of alertness, often accompanied by racing thoughts. The thoughts didn't cause the waking; the waking opened the door to the thoughts. This matters because the intervention isn't 'fix the thoughts' — it's address the underlying arousal.

If the anxiety pattern fits, our piece on why your mind races at bedtime goes into the techniques that actually quiet it.

Which one is yours: a three-question heuristic

  • On nights when nothing is scheduled the next day, do you still wake at 3am? If no, your pattern likely has a stress or schedule component. If yes, it's probably a more structural sleep-maintenance issue.
  • On vacation or weekends when you sleep on your own clock, does the pattern soften within a few days? If yes, suspect circadian misalignment or anxiety. If no, suspect a deeper sleep-maintenance pattern.
  • When you wake, is the dominant feeling 'alert and anxious' or 'wide awake but calm'? Anxious leans toward cortisol/anxiety driven. Calm-but-awake leans toward circadian or sleep-architecture.

Our 5-minute diagnostic identifies your primary pattern and any secondary contributor, so the protocol you follow actually matches what's happening.

Why 3am specifically

Your cortisol curve naturally begins its early-morning rise between two and four. In healthy sleepers, this is invisible — you sleep through it because your sleep is consolidated enough to ride over the small physiological signal. When sleep is fragmented for any reason, you're light enough in those hours to feel the cortisol shift, and once you're feeling it, you're awake. 3am isn't cursed; it's just the time when the body's anticipation of morning starts to be detectable.

INTERACTIVE TOOLSee your alertness across 24 hoursOpen the alertness curve →

Tonight: the rest of this night

If you've already been awake thirty or sixty minutes and stimulus control isn't producing sleep, the next step is acceptance. Not as a feel-good gesture — as a tactical move. The arousal that's keeping you awake is partly being fueled by the fight against the wakefulness itself. When you stop fighting, the arousal often drops enough that sleep returns. When it doesn't, you at least stop digging the hole deeper.

Tonight is going to be a partly lost night. That's a real cost. It's not, however, permanent damage. Humans evolved to lose sleep occasionally and function the next day, and the function is meaningfully better when you don't catastrophize about it during the night.

What to do with the rest of this night and tomorrow

  • Don't sleep in tomorrow. This is the single most important sentence on this page. Lying in bed late to 'make up' lost sleep flattens the sleep pressure that your body needs to consolidate sleep tomorrow night. You will feel worse for an extra hour of fragmented dozing than you would feel if you got up on time.
  • If you must nap, keep it under twenty minutes and finish before 2pm. Naps longer than this also blunt tomorrow night's sleep pressure.
  • Get bright light within thirty minutes of waking. Daylight if possible, a bright bathroom and kitchen if not. Morning light anchors your cortisol curve to the right hour — this is your single highest-leverage move for tomorrow night.
  • Skip the extra coffee. Stay with your normal dose. An extra cup will help with the morning fog at the cost of tomorrow night's onset.
  • Talk to one person honestly about the bad night. Naming it removes some of the catastrophizing weight.

The next nights: the actual fix

One bad night isn't insomnia. Three or more bad nights per week for three months or longer is insomnia. If this is your first bad night in a while, run the protocol above and let the body recover. If you've been here before — many times — what you're looking at isn't a one-night problem.

The good news: chronic insomnia is one of the most treatable health conditions in adult medicine. Cognitive Behavioral Therapy for Insomnia (CBT-I), an 8-session structured protocol delivered by a trained clinician or via a quality self-directed program, has better long-term outcomes than any sleeping pill in head-to-head trials. The bad news: it takes two to four weeks of consistent practice to feel the change, and the first one or two weeks can be harder than your baseline before things improve.

What CBT-I actually contains

  • Stimulus control — the get-out-of-bed-after-twenty-minutes protocol we described above, applied every night, not just bad ones.
  • Sleep restriction therapy — temporarily restricting your time in bed to consolidate your sleep pressure into a smaller, more efficient window. Counterintuitive, well-supported, hardest part to do alone.
  • Cognitive restructuring — addressing the catastrophic thinking ('if I don't sleep I'll fail tomorrow') that fuels the arousal that prevents sleep.
  • Relaxation training — specifically, parasympathetic activation techniques like extended-exhale breathing in the hours before bed.
  • Sleep hygiene cleanup — caffeine, alcohol, light timing, room temperature. This is the part most generic sleep articles overweight; in CBT-I, it's a supporting role, not the headline.

Stimulus control is the single heaviest lever in this list. We have a full protocol guide with the six rules, the timeline, and the failure modes nobody warns you about.

Sleep restriction therapy is the other behavioral CBT-I component, usually run alongside stimulus control. The 4-week guide walks through the calculations, the 85% efficiency target, and the week-by-week titration.

Identify your pattern first

CBT-I components are not all equally relevant to every pattern. Stimulus control matters most for sleep-onset and hyperarousal. Light timing matters most for circadian misalignment. Sleep restriction is a sleep-maintenance lever. Doing the wrong piece for your pattern is a common reason people 'try CBT-I' and report it didn't work. Our 5-minute diagnostic identifies which protocol to lead with — and our full pillar guide on insomnia walks through the three patterns in detail.

What about supplements? Melatonin? Magnesium?

At 3am, here is the honest answer: nothing in your supplement cabinet is going to put you back to sleep tonight.

Melatonin is a timing signal, not a sedative. It tells your circadian system 'night is coming.' Taken at 3am, it does nothing useful for the immediate problem and may carry over as next-morning grogginess. The one place melatonin earns its evidence — circadian misalignment — uses low doses (0.3-0.5mg) timed four to six hours before the desired bedtime. Not at 3am, not at the dose you'd find in a typical over-the-counter bottle.

Magnesium glycinate has weak but suggestive evidence for sleep when anxiety is part of the picture. It's a low-risk supplement worth a fair trial, but it's not a fix for the pattern. If it helps, it helps gently and over weeks, not tonight.

Prescription hypnotics — zolpidem (Ambien), eszopiclone (Lunesta), and benzodiazepines like temazepam — work. They reliably produce sleep, including middle-of-night sleep. They also build tolerance within two to four weeks for most people, produce dependence with regular use, and degrade sleep architecture in ways that aren't visible from the inside. In the rare 6-month head-to-head trials of CBT-I versus hypnotics, CBT-I wins by a wide margin. Pills are a bridge in acute episodes; they are not the destination.

The same-hour pattern almost always has a cortisol component — 3am cortisol awakening covers the biology underneath.

If you've been waking and lying awake for 30+ minutes most nights, stimulus control therapy is the protocol that prevents the conditioning from worsening.

When the pattern has been chronic for months, sleep restriction therapy is the structural fix.

Evening alcohol is the most common reversible 3am driver — alcohol and sleep covers the architectural mechanism.

Late caffeine compounds the early-morning sympathetic surge — caffeine half-life and sleep walks through the timing math.

Hormonal 3am wakes follow a different mechanism — perimenopause insomnia for the cycle-linked patterns.

The architectural detail of why 3am specifically is in REM and deep sleep.

If your wearable keeps flagging 3am wakes, sleep tracker comparison covers what each device sees and what it misses.

Frequently asked questions

How long should I wait before getting out of bed?

Roughly twenty minutes is the standard guidance. You should not be looking at a clock to measure this — clock-watching itself amplifies arousal. The rule of thumb: if you feel like 'a while has passed' and you are still wide awake, that's your twenty minutes. Get up. The protocol is forgiving about precision; what matters is that you leave the bed when it's clearly not working, not that you wait exactly 1200 seconds.

What if I have to be up in three hours?

Still get out of bed. The intuition says 'I should stay in bed to at least rest,' but the data is clear that lying awake in bed produces worse next-day function than getting up briefly and returning when sleepy. You will not 'lose' the three hours by leaving the bed for twenty minutes — you'll lose them more reliably by lying there building arousal.

Is it okay to use my phone in dim mode?

No. The blue-light suppression of melatonin is a real but small effect at typical phone brightness. The much larger effect is cognitive arousal: any feed-style content (news, social, email) reliably pulls your nervous system away from the parasympathetic state sleep requires. A dim screen scrolling Twitter is worse for tonight's sleep than a bright bedside lamp lighting a printed book.

What if my partner wakes up if I leave the bed?

Two practical steps. First, have a daytime conversation about it — most partners are more bothered by being woken by your tossing and turning than by you quietly slipping out for twenty minutes. Second, prepare the route in advance: a soft slipper by the bed, a dim lamp already positioned in the next room, the door hinges quiet. Removing friction matters; the protocol fails most often because of small obstacles you didn't pre-solve.

When should I see a doctor about this?

If middle-of-night waking has been happening three or more nights per week for three months or longer, and it's producing daytime impact — fatigue, mood changes, difficulty focusing — that crosses the line into clinical insomnia and warrants professional evaluation. Earlier than that if you suspect sleep apnea (loud snoring, witnessed pauses in breathing, daytime sleepiness despite full time in bed), if you're considering medication, or if mental health symptoms are escalating alongside the sleep disruption. See our medical disclaimer for guidance on when professional evaluation is the right next step.