How to Deal with Anxiety at Night and Sleep Better

Nighttime anxiety is one of the most common sleep disruptions, and it has a straightforward explanation: during the day, your brain stays busy enough to keep worries in the background. At night, when external stimulation drops away, those worries rush forward with nothing to compete against. The good news is that specific techniques can interrupt this cycle, and most of them work within the first few nights of consistent practice.

Why Anxiety Gets Worse at Night

Your brain doesn’t suddenly produce new fears at bedtime. It simply loses the distractions that kept existing fears quiet. Work tasks, conversations, screens, and movement all occupy mental bandwidth during the day. Lying in a dark, quiet room removes every one of those buffers at once. The result is a spotlight effect where a worry that barely registered at 2 p.m. feels catastrophic at midnight.

There’s also a biological layer. Your body’s stress hormones don’t always wind down on schedule, especially if you’ve been stimulated close to bedtime by screens, caffeine, or intense conversations. When your nervous system is still running in a slightly activated state, your mind interprets that physical tension as evidence that something is wrong, which generates more anxious thoughts, which keeps your body tense. Breaking this loop is the core goal of every technique below.

The 5-4-3-2-1 Grounding Technique

If you’re lying in bed right now with a racing mind, this is the fastest tool to try. It works by forcing your attention out of your thoughts and into your immediate physical surroundings. Start with a few slow, deep breaths, then move through five senses in descending order:

  • 5 things you see. A shadow on the ceiling, the outline of your window, the glow of a clock. Even in a dark room, your eyes can pick out shapes.
  • 4 things you can touch. The weight of your blanket, the texture of your pillowcase, the temperature of the air on your face, the softness of your mattress.
  • 3 things you hear. A fan humming, traffic outside, your own breathing. Focus on sounds outside your body.
  • 2 things you can smell. Your pillow, laundry detergent on your sheets, or lotion on your hands.
  • 1 thing you can taste. Toothpaste, water, whatever lingers in your mouth.

By the time you reach “one,” your brain has spent a full minute or more engaged with real sensory input instead of hypothetical fears. You can repeat the cycle as many times as needed.

Progressive Muscle Relaxation

Anxiety stores itself in your body as tension you may not even notice. Progressive muscle relaxation, a technique backed by decades of research at institutions including Harvard, systematically releases that tension so your nervous system gets a clear signal that it’s safe to sleep.

Start at your feet. Curl your toes and arch your feet, hold for about five seconds, then let them go completely and feel them sink into the mattress. Move upward through your calves, thighs, buttocks, lower back, abdomen, upper back, shoulders, arms, hands, neck, jaw, and forehead. At each stop, tense the muscle group briefly, then release. Breathe slowly and softly throughout. The entire sequence takes roughly 10 to 15 minutes, and many people fall asleep before they reach their forehead. The key is to notice the contrast between the tension and the release. That contrast teaches your body what “relaxed” actually feels like, which is surprisingly useful for people who carry chronic tension without realizing it.

Scheduled Worry Time Earlier in the Day

One of the most effective long-term strategies is also the most counterintuitive: schedule a specific time to worry, on purpose, every day. The concept comes from cognitive behavioral therapy and is used in protocols recommended by the American Psychological Association.

Pick a 10 to 15 minute window that is not close to bedtime. Many people use the time before dinner. During that window, write down or think through every worry on your mind. Problem-solve where you can, and simply acknowledge what you can’t control. The rest of the day, whenever a worry surfaces, you tell yourself it needs to wait for its scheduled slot.

This works because anxiety thrives on the feeling that you need to think about a problem right now or you’ll forget it, or something bad will happen. By giving your worries a guaranteed home, you reduce the urgency your brain attaches to them at night. Over time, your mind learns that bedtime is not the designated problem-solving hour, and falling asleep becomes noticeably easier.

Set Up Your Bedroom for Lower Anxiety

Your sleep environment plays a direct role in how activated your nervous system stays at night. Two changes make the biggest difference.

Temperature

Sleep experts recommend keeping your bedroom between 60 and 67°F (15 to 19°C). A cooler room helps your core body temperature drop, which is a signal your brain uses to initiate sleep. If you tend to wake up hot and anxious in the middle of the night, your room may simply be too warm.

Screens and Light

Two hours of exposure to an LED tablet or phone screen suppresses your body’s sleep hormone production by about 55% and delays its natural onset by roughly an hour and a half compared to reading a printed book under dim light. That’s not a subtle effect. It means your brain is still in a chemically wakeful state long after you’ve put the phone down. If you use your phone as a wind-down tool, switching to a physical book, an audio-only podcast, or a meditation app with the screen face down can significantly reduce how long you lie awake.

Breathing Patterns That Calm Your Nervous System

Slow breathing is not just a relaxation cliché. When you exhale longer than you inhale, you activate the branch of your nervous system responsible for rest and recovery. A simple pattern to try: breathe in through your nose for four counts, hold for four counts, and exhale slowly through your mouth for six to eight counts. Repeat for two to three minutes. You don’t need to count perfectly. The goal is simply to make your exhale longer than your inhale, which sends a direct physiological signal to your body that the threat has passed.

This pairs well with the progressive muscle relaxation described above. Do the breathing first to bring your baseline activation down, then move into the muscle sequence.

When Nighttime Anxiety Feels Like Panic

Some people don’t just feel worried at night. They wake up suddenly with a pounding heart, shortness of breath, and a sense of dread. These are nocturnal panic attacks, and they’re distinct from night terrors. The key difference is awareness: if you wake up and know what’s happening, feel the fear, and struggle to fall back asleep, that’s a panic attack. People experiencing night terrors often have no memory of the episode and may appear awake (screaming, moving around) while remaining asleep.

Nocturnal panic attacks are not dangerous, but they are deeply unpleasant and can create a fear of going to sleep that makes anxiety worse over time. The grounding and breathing techniques above work for these episodes too. The most important thing during a nocturnal panic attack is to remind yourself that the symptoms will peak and pass, usually within 10 to 20 minutes. Sitting up, turning on a dim light, and doing the 5-4-3-2-1 exercise can help shorten the episode by giving your brain something concrete to focus on.

Magnesium and Sleep Anxiety

Magnesium plays a role in nervous system regulation, and many people with anxiety are mildly deficient without knowing it. Certain common medications, including those for high blood pressure and acid reflux, can lower magnesium levels over time. The recommended daily intake for adult women is 310 to 320 mg and for adult men is 400 to 420 mg, depending on age. Many people don’t reach these levels through diet alone. Magnesium glycinate is one of the better-absorbed forms and is less likely to cause digestive issues than other types. It’s worth noting that people with kidney disease or those who are pregnant should check with a provider before supplementing, as magnesium interacts with several medications and conditions.

Building a Consistent Wind-Down Routine

Individual techniques help, but they work best inside a predictable routine your brain learns to associate with sleep. A practical wind-down sequence might look like this: screens off 60 to 90 minutes before bed, a warm shower or bath (which helps your core temperature drop afterward), 10 minutes of reading or light stretching, then lights out with a progressive muscle relaxation or breathing exercise. The specific activities matter less than the consistency. After a few weeks of the same sequence, your brain begins treating those cues as a countdown to sleep, lowering your anxiety before you even get into bed.

If you’ve been lying awake for more than 20 minutes, get up and move to another room. Do something quiet and low-stimulation (reading on paper, listening to calm music) until you feel drowsy, then return to bed. This prevents your brain from building an association between your bed and the frustration of not sleeping, which is one of the most common ways nighttime anxiety becomes chronic.