How to stop waking up at night with anxiety
Waking up at night with anxiety usually comes from a stressed nervous system meeting the light, broken sleep of the early hours: a small stir turns into full waking, and the mind fills the silence with worry. You stop it in two places. In the moment, you keep the waking small: no clock, slow breathing, a dull mental task, and out of bed if you're still awake after about 20 minutes. During the day, you give worry a fixed time and place, keep one wake-up time, and cut what makes sleep lighter, like late alcohol.
Below: why anxiety wakes you in the second half of the night, what to do in the first minute and the next 20, how to handle 3 a.m. thoughts, what a night panic attack is, a 2-week plan, and when a doctor should look first.
Why anxiety wakes you up at night
Everyone wakes several times a night. Sleep runs in cycles of roughly 90 minutes, and between cycles most people surface for a few seconds without remembering it. Anxiety doesn't create these wakings. It turns the brief ones into long ones.
Three things make that happen:
- Sleep gets lighter as the night goes on. Most deep sleep comes in the first 3 to 4 hours. After that, sleep is lighter and wakings come more easily. That's why so many anxious wakings happen between 2 and 5 a.m., not at midnight. Our guide on waking up at 3 a.m. explains the timing.
- An alert body wakes faster. Stress keeps the body's alarm system (heart rate, breathing, stress hormones) running a little high. Insomnia researchers call this hyperarousal. A body that's "on guard" notices small noises, a partner turning over, or a full bladder, and treats them as reasons to wake fully.
- The mind fills the gap. At 3 a.m. there's nothing to look at, no one to talk to, and nothing you can do about the problem. Worry runs without the checks daytime gives it. Small problems look large, and thoughts loop. Then a second worry arrives on top: "If I don't get back to sleep, tomorrow will be awful."
That second worry is the one that keeps the cycle going. Psychologist Allison Harvey's model of insomnia (2002) describes it: worry about sleep raises arousal, you scan for signs you're not sleeping (checking the clock, noticing your heartbeat), you see "evidence", and you become more awake. A few weeks of this and the bed itself becomes a cue for alertness.
Is it anxiety, or something else waking you?
Anxiety can be the cause, the result, or both. Before you treat it as anxiety, look at what you notice in the first seconds of waking.
| What you notice when you wake | What it may point to | What to do |
|---|---|---|
| Racing thoughts about work, money, family, then about sleep | Anxiety and worry | The steps in this guide |
| Sudden pounding heart, short breath, dread, out of deep sleep, with no dream | A nocturnal panic attack | See the panic section below; tell a doctor |
| Gasping, choking, snoring, dry mouth, morning headaches | Sleep apnea (breathing stops) | See a doctor; the anxiety may be your body reacting to it |
| Hot, sweating, then wide awake (often women in their 40s and 50s) | Night sweats, often perimenopause | Our perimenopause insomnia guide |
| Needing to pass urine, then can't settle | Nocturia: fluids, alcohol, medicines, bladder or prostate | Less fluid 2 hours before bed; a doctor if it's 2+ times a night |
| Alert after a few drinks the evening before | Alcohol wearing off | Earlier and fewer drinks; see the plan below |
| Low mood, waking early and unable to sleep again most days | Possibly depression | See a doctor; our guide on waking up too early |
It can be more than one row. Many people with sleep apnea or night sweats wake up anxious, because the body's alarm system fires as they come out of sleep.
What to do in the first minute after you wake
The first minute decides whether a waking stays small. The aim is to send your brain the message "nothing to deal with here".
- Don't look at the clock. Seeing 3:14 starts the sums ("only 3 hours left") and the worry about tomorrow. A study by Tang, Schmidt and Harvey (2007) found that people with insomnia who could watch the clock worried more and took longer to fall asleep than those who couldn't. Turn the clock to the wall and put the phone across the room tonight.
- Don't move much. Stay lying where you are. Getting up at once, turning on a light or reaching for the phone wakes you further.
- Breathe out longer than you breathe in. In through the nose for about 4, out slowly for about 6, for 10 breaths. A long out-breath slows the heart. Don't force deep breaths; slow and easy is enough.
- Name it, then leave it. Say to yourself, "This is a normal waking, and my mind is busy." Labelling a thought takes some of its push away. You're not trying to argue with the worry, just to stop feeding it.
If you're still awake: the next 20 minutes
If sleep doesn't come back in what feels like 15 to 20 minutes (a guess, not a clock check), change what you're doing.
- Give the mind a dull job. Worry needs space. Fill it with something that takes a little effort and has no emotion: name a fruit or animal for each letter of the alphabet, picture walking through a house you know room by room, or count backwards from 300 in threes. If you lose your place, start again; that's the point.
- Relax the body in order. Tense and release each part for a few seconds, feet up to face. Progressive muscle relaxation is one of the methods named in sleep medicine guidelines for insomnia (Edinger and colleagues, 2021).
- Then get up if it isn't working. If you're still awake and getting more alert or frustrated, get out of bed. Go to another room with a lamp, not a ceiling light, and do something quiet and slightly boring: a paper book, folding laundry, a puzzle, gentle stretches. Go back when your eyes feel heavy. Do this as often as you need to. This is stimulus control, the rule set that teaches the brain that bed means sleep, not lying awake worrying. Our stimulus control guide has the full rules.
What to avoid out of bed: your phone (news, email and social apps are built to wake you up), bright lights, food beyond a small snack if you're truly hungry, and work. Getting up is not a punishment and it's not about "giving up on sleep". It's how you stop the bed being the place where the worry happens.
If getting up isn't possible (pain, a cold house, a partner you'd wake), sit up in bed with a dim book light and do the same quiet activity, then lie down when sleepy. Clinicians call this counter-control. It works less well than leaving the room, but better than lying in the dark arguing with yourself.
What to do with 3 a.m. thoughts
Night worries feel urgent. They almost never are. A few ways to handle them:
- Write it down and close it. Keep paper and a pen by the bed (no phone). Write the worry in a few words and one next step: "Call the bank. Tuesday." Then tell yourself it's parked until a set time. A small study by Scullin and colleagues (2018) found that people who wrote a short to-do list for the next day at bedtime fell asleep faster than people who wrote about what they'd already done.
- Check the 3 a.m. version. Ask: "Would this look the same at 11 a.m. with a coffee?" The answer is nearly always no. You don't have to solve it now; you only have to notice it's the night talking.
- Postpone it. If the same worry keeps coming back, tell it: "Not now. 6:30 tomorrow evening." Then keep that appointment (below). Worry postponement is a standard tool in therapy for generalised anxiety.
- Let sleep worry be there. Trying hard to fall asleep keeps you awake. Instead, aim for rest: "I'm lying still and resting, and that's useful." Many people fall asleep more easily once they stop trying.
For thoughts that start before you've fallen asleep, our guide on when your brain won't shut off has a tool for each kind of racing thought.
Waking up with a panic attack at night
Some people wake with a sudden surge of fear: pounding heart, short breath, shaking, sweating, a sense of doom, sometimes chest tightness. This is a nocturnal panic attack. It usually comes out of non-dream sleep, often in the first part of the night, and isn't the same as a nightmare. It's common in people who also have daytime panic attacks, though it can happen on its own (Craske and Tsao, 2005).
What helps in the moment:
- Sit up, put your feet on the floor, and turn on a soft light.
- Tell yourself what it is: "This is panic. It peaks and passes, usually within minutes."
- Breathe slowly with a long out-breath. Don't breathe fast and deep; that makes the tingling and light-headedness worse.
- Look around and name 5 things you can see. It brings attention back to the room.
- Once it passes, stay up in dim light until you feel sleepy, then go back.
The first time chest pain or shortness of breath wakes you, get it checked by a doctor, and call 911 for chest pain that doesn't settle, pain spreading to the arm or jaw, or fainting. Don't assume it's panic. If attacks are repeated, panic is very treatable: CBT for panic disorder and some medicines work well, so it's worth raising with your doctor.
During the day: what stops the night waking
The night is where anxiety shows up. The day is where most of the fixing happens.
Give worry its own time
Set 15 minutes in the early evening, at least 2 hours before bed. Sit at a table with paper. Write down what's on your mind, and for each item, either one next step or "can't act on this now". Then close the notebook. When a worry arrives at night, you can tell it, truthfully, that it has a time. People often find the worries get shorter within a week or two, because the brain stops needing the night to process them.
Keep one wake-up time
Get up at the same time every day, weekends too, even after a bad night. It's the strongest single anchor for your body clock, and it builds sleep pressure for the next night. Lying in after an anxious night feels kind, but it makes the next night lighter and more broken.
Don't spend extra time in bed
After bad nights, many people go to bed earlier "to catch up". More time in bed than you can sleep spreads sleep thin, with more wakings and more time lying awake to worry. If you sleep about 6 hours, being in bed for 9 makes things worse. Our guide on sleep restriction shows how to set a sleep window that fits the sleep you actually get.
Watch alcohol and caffeine
- Alcohol helps you fall asleep, then breaks up the second half of the night as it wears off, often with a racing heart and a hot, alert waking that feels like anxiety. Reviews of the research (Ebrahim and colleagues, 2013) show this pattern even at moderate doses. Try alcohol-free evenings for 2 weeks, or stop at least 3 to 4 hours before bed.
- Caffeine stays in the body for hours: coffee 6 hours before bed still cut sleep by about an hour in one study (Drake and colleagues, 2013). For an anxious sleeper, keep it to the morning, before noon if you can.
Move, and get daylight
Regular exercise is linked with better sleep and lower anxiety. A brisk 20 to 30 minute walk, outside in the morning, does both jobs: daylight sets your clock and movement burns off some of the day's tension. Hard exercise late at night keeps some people up; earlier is safer.
A wind-down that ends the day
Anxious people often go from email straight to bed. Give yourself 30 to 60 minutes of low light and nothing that matters: no work, no news, no hard conversations. Our bedtime routine for adults gives a timed version, including one for anxiety.
A 2-week plan to stop waking up anxious
| Days | Do this | Why |
|---|---|---|
| 1–3 | Keep a short sleep diary: bedtime, rough wake-ups, wake time, drinks, how anxious you felt (0–10). Set one wake-up time and keep it. Turn the clock away. | You see the pattern, and the clock stops feeding the worry. |
| 4–7 | Add a 15-minute worry time in the early evening. Paper by the bed for night thoughts. Breathing and a dull mental task when you wake. | Worry gets a home outside the bed. |
| 8–10 | Add the get-up rule: still awake after about 20 minutes and getting tense, go to another room with a lamp. No phone. Back when sleepy. | Bed is relearned as a place for sleep. |
| 11–14 | No alcohol within 3–4 hours of bed (or none). Caffeine before noon. A morning walk outside. If your diary shows you're in bed 1.5+ hours longer than you sleep, shorten time in bed by going to bed later. | Deeper, more solid sleep, with fewer light patches to wake in. |
Expect the first week to feel no better, or a little worse, especially when you start getting up. That's normal: you're in the hardest part of changing a habit. Most people who stick with these steps see wakings get shorter before they get fewer. If you want to start with your own numbers, the free 2-minute sleep quiz works out how long you're awake in bed and suggests a starting sleep window.
Mistakes that keep anxious waking going
- Checking the time. Every check is a small shot of alarm.
- Scrolling to "calm down". The phone brings new things to think about and bright light. Use paper, a book, or audio you've set up before bed with the screen off.
- Lying there for hours. It feels like resting; over weeks it trains the bed to mean worry.
- Sleeping in or napping long after a bad night. It steals sleep pressure from the next night. A nap, if you need one, is 20 minutes before 3 p.m.
- A nightcap to "take the edge off". It brings on the 3 a.m. waking you're trying to stop.
- Trying to fix the problem at night. Anything you plan at 3 a.m. you'll redo in the morning. Park it.
- Changing everything at once, then giving up after 3 nights. Add one step every few days and judge after 2 weeks.
When to see a doctor
Self-help is a good first step for most people, but see a doctor if:
- Waking at night has happened 3 or more nights a week for 3 months or more, or it's hurting your work, driving or relationships. That's the usual definition of chronic insomnia, and CBT for insomnia (CBT-I) is the first treatment doctors recommend for it (American College of Physicians, 2016).
- You snore loudly, gasp or choke at night, or someone has seen you stop breathing.
- You wake with chest pain, a racing or irregular heartbeat, or shortness of breath for the first time.
- Anxiety is high during the day too, or you're having panic attacks. Anxiety disorders are very treatable with talking therapy, medicine or both.
- Your mood is low most days, you've lost interest in things, or you wake very early unable to sleep again.
- You've started a new medicine around the time the wakings began; some (including some antidepressants, steroids and decongestants) can disturb sleep.
If you have thoughts of harming yourself, call or text 988 (the Suicide and Crisis Lifeline in the US) at any hour, or go to an emergency room.
Some sleeping pills can help for a short time, but guidelines advise CBT-I first because its benefits tend to last after treatment ends. Don't stop a prescribed medicine on your own; talk to the doctor who prescribed it.
Frequently asked questions
Why do I wake up at night with anxiety for no reason?
Often there is a reason, just not one you're aware of in the moment: built-up stress, alcohol wearing off, a light patch of sleep in the early hours, or a noise. A body running on alert turns a normal brief waking into full waking, and the mind then supplies the worry.
Why do I wake up at 3 or 4 a.m. with anxiety?
Sleep is lightest in the second half of the night, so wakings happen more easily then. Cortisol, a hormone that helps you wake, also starts rising in the early morning. With stress on top, that light patch is where you surface.
Should I get up or stay in bed when I wake up anxious?
Try to settle in bed first with slow breathing and a dull mental task. If you're still awake after about 20 minutes and getting more alert, get up, go to a dim room and do something quiet until you're sleepy. That's the standard advice in CBT for insomnia.
Can anxiety wake you up from sleep?
Yes. Stress keeps the body's alarm system more active, so you wake more easily and more fully. Some people also have nocturnal panic attacks, which wake them suddenly from sleep with a racing heart and fear.
Does melatonin help with waking up at night from anxiety?
Melatonin mainly shifts the timing of your body clock. It isn't a treatment for anxiety and has little effect on staying asleep for most adults. If anxiety is waking you, the steps above and, if needed, a doctor are a better route.
How long does it take to stop waking up anxious?
Most people need 2 to 4 weeks of steady practice before nights clearly change. The first week can feel harder, especially once you start getting up when awake. Keep the diary so you can see the change; it's often slower to feel than to measure.
Tonight
Turn the clock to the wall, put the phone across the room and leave a pen and paper by the bed. If you wake: breathe out long, name the waking, give your mind a dull job, and get up after about 20 minutes if you're still awake. Tomorrow, book a 15-minute worry time for the early evening. If you'd like your own starting numbers, take the free sleep quiz. For other kinds of night waking, start with how to stop waking up at night, or see all our sleep guides.
Sources: American Academy of Sleep Medicine, International Classification of Sleep Disorders, 3rd edition, 2014 (chronic insomnia). Qaseem A et al., Management of chronic insomnia disorder in adults: a clinical practice guideline from the American College of Physicians, Annals of Internal Medicine, 2016. Edinger JD et al., Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline, Journal of Clinical Sleep Medicine, 2021. Harvey AG, A cognitive model of insomnia, Behaviour Research and Therapy, 2002. Tang NKY, Schmidt DA, Harvey AG, Sleeping with the enemy: clock monitoring in the maintenance of insomnia, Journal of Behavior Therapy and Experimental Psychiatry, 2007. Scullin MK et al., The effects of bedtime writing on difficulty falling asleep, Journal of Experimental Psychology: General, 2018. Craske MG, Tsao JCI, Assessment and treatment of nocturnal panic attacks, Sleep Medicine Reviews, 2005. Ebrahim IO et al., Alcohol and sleep I: effects on normal sleep, Alcoholism: Clinical and Experimental Research, 2013. Drake C et al., Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed, Journal of Clinical Sleep Medicine, 2013. 988 Suicide and Crisis Lifeline, 988lifeline.org. This guide is education, not medical advice.