Lying in bed with your mind racing is exhausting. Anxiety at night can feel like your own brain is working against you. The good news is that you can learn how to go to sleep with anxiety using steps that are backed by real evidence. Start tonight by getting out of bed for 15 minutes if you cannot sleep, doing a simple breathing exercise, and writing down your worries on paper. These three actions alone can break the cycle of anxious thoughts and help your body shift into rest mode.
Why Does Anxiety Get Worse at Night?
Anxiety often spikes at night because there are fewer distractions. During the day, work, errands, and conversations keep your mind busy. When you lie down in a dark quiet room, your brain has nothing else to focus on except your worries.
Your body also has a natural stress response that can get confused. The hormone cortisol, which triggers alertness, should drop at night. But for people with anxiety, cortisol levels can stay high. Research published in the journal Sleep found that people with anxiety disorders have higher nighttime cortisol compared to people without anxiety. This makes falling asleep harder and staying asleep even harder.
There is also something called “sleep anxiety” or “somniphobia.” This is the fear of not being able to sleep. The more you worry about not sleeping, the more your brain stays alert. It becomes a loop that feeds itself.
What Is the 15-Minute Rule for Falling Asleep?
This is one of the most effective techniques from cognitive behavioral therapy for insomnia (CBT-I). The rule is simple: if you have been lying in bed for more than 15 minutes and cannot sleep, get up. Go to another room. Do something calm and boring in dim light. Read a physical book. Fold laundry. Listen to a quiet podcast. Do not look at your phone or a bright screen.
Why does this work? Your brain learns to associate your bed with being awake and anxious. Every minute you lie there worrying, you strengthen that link. Getting out of bed breaks the connection. You want your brain to see your bed as a place for sleep only.
This is widely claimed in sleep medicine, and strong evidence supports it. The American Academy of Sleep Medicine includes this technique as a core part of CBT-I. The key is to return to bed only when you feel sleepy again. Not just tired — sleepy. If you still cannot sleep after going back, repeat the process.
How Can Breathing Exercises Help You Go to Sleep with Anxiety?
Breathing exercises work because they directly affect your nervous system. When you breathe slowly and deeply, you activate the vagus nerve. This nerve tells your body to shift from “fight or flight” mode to “rest and digest” mode. It lowers your heart rate and blood pressure within minutes.
The most studied technique is called the 4-7-8 breath. Breathe in through your nose for 4 seconds. Hold your breath for 7 seconds. Breathe out slowly through your mouth for 8 seconds. Repeat this four times. Research from Stanford University found that slow breathing at about six breaths per minute can reduce anxiety and improve sleep quality.
A simpler version that also works is box breathing. Breathe in for 4 seconds, hold for 4 seconds, breathe out for 4 seconds, hold for 4 seconds. Do this for two minutes. It is easy to remember even when your mind is racing. Some people report that this technique helps them fall asleep faster, though individual results vary.
One non-obvious point: do not force the breathing. If you feel lightheaded, you are pushing too hard. The goal is gentle slowing, not dramatic gasping. Your body will naturally follow the rhythm.
Does Writing Down Worries Actually Stop Racing Thoughts?
Yes, and the research is surprisingly strong. A study from Baylor University found that people who wrote down their worries for 15 minutes before bed fell asleep faster than those who did not. The group that wrote a detailed to-do list for the next day fell asleep the fastest — about 9 minutes faster on average.
The act of writing moves your worries from your head onto paper. This is called “cognitive offloading.” Your brain stops trying to hold onto the thought because it knows the paper will remember it. For people with anxiety, this can be a powerful tool. You are not ignoring your worries. You are simply telling your brain that you will deal with them tomorrow.
Here is a practical way to do it:
- Keep a notebook and pen next to your bed
- Write down everything on your mind for 5 minutes
- Do not judge or edit what you write
- Close the notebook and put it away
- Tell yourself: “I can look at this tomorrow if I need to”
Some people prefer to write a “brain dump” without any structure. Others like a simple list. Both work. The key is that you do it before you turn off the light, not after you are already lying in bed trying to sleep.
What Foods and Drinks Make Nighttime Anxiety Worse?
Caffeine is the biggest offender. It blocks adenosine, the chemical that makes you feel sleepy. The half-life of caffeine in most people is about 5 hours. That means if you drink coffee at 4 PM, half of it is still in your system at 9 PM. Some people are slow metabolizers and feel the effects for up to 10 hours. The general rule is to stop caffeine by 2 PM.
Alcohol is trickier. It can make you feel sleepy at first, but it disrupts your sleep cycle later in the night. Alcohol reduces REM sleep and causes more frequent awakenings. The National Sleep Foundation reports that even one drink before bed can reduce sleep quality. If you have anxiety, alcohol can also cause a rebound effect where your anxiety spikes as the alcohol wears off in the middle of the night.
Sugar and heavy meals close to bedtime can also cause problems. Blood sugar spikes and crashes can trigger anxiety symptoms. A large meal before bed forces your body to work on digestion instead of winding down. The best practice is to stop eating at least two hours before you plan to sleep. If you need a snack, choose something small like a banana or a handful of almonds.
| Food or Drink | Effect on Sleep | Recommendation |
|---|---|---|
| Caffeine | Blocks sleep chemicals for hours | Stop by 2 PM |
| Alcohol | Disrupts REM sleep, causes nighttime awakenings | Avoid within 3 hours of bed |
| Heavy meals | Triggers digestion, can cause heartburn | Finish eating 2 hours before bed |
| Sugary snacks | Causes blood sugar swings | Choose protein or fat instead |
When Should You Talk to a Doctor About Nighttime Anxiety?
If you have tried these steps for a few weeks and still cannot sleep, it is time to talk to a professional. Occasional bad nights are normal. But if anxiety is keeping you awake most nights, or if you feel exhausted during the day, you may have an anxiety disorder or insomnia that needs treatment.
Some warning signs include: waking up multiple times a night with your heart racing, feeling panicked when you think about bedtime, or avoiding sleep because you dread the anxiety. These are not signs of weakness. They are signs that your nervous system needs more support than self-help techniques can provide.
A doctor may recommend cognitive behavioral therapy for insomnia (CBT-I), which is the first-line treatment for chronic sleep problems. Some people also benefit from medication, but this should always be discussed with a healthcare provider. Never take over-the-counter sleep aids regularly without talking to a doctor — they can cause dependence and actually make sleep worse over time.
If you have thoughts of harming yourself or feel completely hopeless, call or text 988 in the US. That is the Suicide and Crisis Lifeline. It is available 24/7 and you do not need to be in crisis to call. They can help you find local mental health resources.
Frequently Asked Questions
Does melatonin help with anxiety at night?
Melatonin helps you fall asleep faster but does not directly treat anxiety. It is a sleep hormone, not an anti-anxiety medication.
Can exercise before bed make anxiety worse?
Intense exercise within an hour of bed can raise heart rate and make it harder to sleep. Gentle stretching or yoga is fine.
How long does it take for breathing exercises to work?
Most people feel calmer within 2 to 3 minutes of slow breathing. It is not instant but it is one of the fastest natural tools available.
Is it okay to watch TV until I fall asleep?
TV light and sound can keep your brain alert. It is better to use a sleep story or quiet podcast with a sleep timer instead.

