How to Get a Good Night’s Sleep With Anxiety

Anxiety and sleep feed on each other: worry keeps you awake, and poor sleep makes anxiety worse the next day. Breaking that cycle requires more than generic “sleep hygiene” tips. The strategies below target the specific ways anxiety disrupts sleep, from racing thoughts to a body that won’t stop buzzing, and they’re backed by solid clinical evidence.

Why Anxiety Makes It Hard to Sleep

When you’re anxious, your nervous system stays in a state of high alert. Your heart rate is elevated, your muscles are tense, and your brain is scanning for threats. This is the opposite of what your body needs to fall asleep, which is a gradual shift into calm. The problem compounds at night because there are fewer distractions. The quiet and darkness that should signal rest instead become an open stage for worry.

Many people with anxiety also develop a secondary fear: the fear of not sleeping. You lie down already bracing for a bad night, which spikes adrenaline at exactly the wrong moment. Over time, your brain starts associating the bed itself with alertness rather than rest. That association is powerful, but it can be unlearned.

Calm Your Body Before Bed

Breathing exercises are one of the fastest ways to shift your nervous system out of alert mode. The 4-7-8 technique is simple and effective: inhale through your nose for four counts, hold for seven counts, then exhale slowly through your mouth for eight counts, letting the air make a soft whooshing sound. Repeat for three more cycles. The long exhale is what activates your body’s relaxation response. Doing this twice a day, not just at bedtime, trains your nervous system to downshift more easily.

Progressive muscle relaxation works on the same principle from a different angle. Starting at your feet and working up, you tense each muscle group for five seconds and then release. The contrast between tension and release teaches your body what “relaxed” actually feels like, which is surprisingly hard to recognize when anxiety is your baseline. Pairing this with 4-7-8 breathing as part of a consistent pre-sleep routine can significantly reduce the time it takes to fall asleep.

Stop the Racing Thoughts

The most effective technique for quieting a busy mind at night is deceptively simple: schedule your worrying for earlier in the day. This is called “designated worry time,” and it works because it gives your brain permission to stop. Here’s how to set it up:

  • Pick a time and place. Choose a 15-to-20-minute window, ideally at least a few hours before bed. Sit in a specific chair or spot that isn’t your bed.
  • Capture worries during the day. When an anxious thought pops up, jot it down in your phone or on paper. Tell yourself you’ll deal with it at your worry time, then refocus on what you’re doing.
  • Use the timer. When your scheduled time arrives, set a timer, go through your list, and actually think about each worry. You’ll find some have already resolved themselves. When the timer goes off, stop. Anything unfinished goes on tomorrow’s list.

This works because anxious brains are terrified of forgetting something important. Writing worries down and assigning them a time slot removes the urgency. When those same thoughts try to show up at 11 p.m., you’ve already addressed them, or you know you will tomorrow.

Rebuild Your Bed-Sleep Connection

If you’ve spent months lying in bed scrolling, worrying, or staring at the ceiling, your brain no longer treats the bed as a place for sleep. This is one of the core problems that Cognitive Behavioral Therapy for Insomnia (CBT-I) addresses, and it’s the treatment the American Academy of Sleep Medicine recommends as the most effective first-line approach for chronic insomnia. About 7 to 8 out of 10 people who go through CBT-I see significant improvement, and it also reduces anxiety and depression symptoms.

You can start applying its principles on your own. The central rule is called stimulus control: your bed is for sleep and intimacy only. No phone, no TV, no reading, no lying there trying to force sleep. If you’ve been awake for roughly 20 minutes, get up, go to another room, and do something quiet and boring in dim light until you feel genuinely sleepy. Then go back to bed. This feels counterintuitive and frustrating at first, but it retrains your brain to associate the bed with falling asleep rather than with being awake and anxious.

A related technique is sleep restriction: temporarily limiting your time in bed to match the amount of sleep you’re actually getting. If you’re only sleeping five hours but spending eight in bed, you’d initially set a five-hour window. This builds up sleep pressure so that when you do go to bed, you fall asleep quickly. As your sleep consolidates, you gradually extend the window. It’s uncomfortable for the first week or two, but it’s one of the most powerful tools for breaking the anxiety-insomnia cycle.

Set Up Your Room for Sleep

Your bedroom temperature matters more than you might think. Your body needs to drop its core temperature slightly to initiate sleep, and a warm room fights that process. Keep your bedroom between 60 and 67°F (15 to 19°C). Think of your bedroom as a cool, dark cave.

Weighted blankets can help with anxiety-driven restlessness. They work through deep pressure stimulation, the same calming principle behind a firm hug or swaddling an infant. The gentle, even pressure across your body can lower your heart rate and reduce that “wired” feeling. Choose one that’s no more than 10% of your body weight so it feels comforting rather than crushing.

Keep screens out of the bedroom entirely if you can. The light matters, but for anxious sleepers the bigger issue is content. One alarming news headline or stressful email at 10:30 p.m. can undo an hour of winding down.

Time Your Exercise Right

Regular physical activity is one of the best long-term treatments for both anxiety and poor sleep. But timing matters. A study published in Nature Communications found that exercising within four hours of bedtime was linked to falling asleep later, sleeping less, and having a higher resting heart rate during the night. Intense exercise keeps your body in a heightened state of alertness, which is exactly the state you’re trying to escape.

If evening is your only option, stick to brief, low-intensity movement like a light jog, an easy swim, or gentle stretching. Otherwise, aim to finish any vigorous workout at least four hours before you plan to sleep.

What About Melatonin and Supplements?

Melatonin is widely used as a sleep aid, but it’s not well suited for anxiety-related insomnia. Melatonin is a timing signal. It helps reset your body clock when your sleep schedule is shifted, such as with jet lag or a delayed sleep phase. It doesn’t address the hyperarousal that keeps anxious people awake. Both the American Academy of Sleep Medicine and the American College of Physicians have stated there isn’t enough strong evidence to recommend melatonin for chronic insomnia. It’s also regulated as a dietary supplement in the U.S., meaning the actual content of each pill can vary from what the label says.

Magnesium (particularly the glycinate form) and L-theanine (an amino acid found in tea) are popular for relaxation, and some people find them helpful. However, experts note we don’t have enough data to strongly recommend them as a combination. If you want to try either one, start with a low dose of around 100 milligrams to see how your body responds. One counterintuitive note: L-theanine can improve focus in some people, which may actually make it harder to fall asleep rather than easier.

No supplement addresses the core problem of anxiety-driven insomnia the way behavioral strategies do. The techniques above, particularly stimulus control, sleep restriction, and scheduled worry time, target the actual mechanisms that keep anxious brains awake. They take more effort than swallowing a pill, but their effects are durable and compound over time.