If you are trying to sleep with anxiety and depression, the first step is to stop treating bedtime as the moment you fix your sleep. Racing thoughts and low mood make falling asleep harder, and poor sleep then makes both conditions worse the next day. The approach that helps most is building a steady daytime rhythm, keeping your bed linked to sleep rather than worry, and getting professional support when insomnia becomes a pattern rather than an occasional rough night.
That is the short version. The rest of this guide explains why this happens and what actually helps, based on established sleep medicine and clinical guidance.
Why Do Anxiety and Depression Make Sleep So Hard?
Anxiety and depression affect sleep through different routes, and many people have both at once. That combination is one reason sleep problems in these conditions can be stubborn.
Anxiety keeps the nervous system in a state of alertness. Your body releases stress hormones, your heart rate stays a little higher, and your brain keeps scanning for threats. That is useful in the daytime and unhelpful at 11 p.m. The result is usually trouble falling asleep, because your mind will not let go of the day.
Depression works differently. It disrupts the timing and structure of sleep itself. People with depression often fall asleep quickly but wake in the early hours and cannot get back to sleep. Some sleep far more than usual yet wake unrefreshed. The architecture of sleep — the stages your brain moves through overnight — can be altered.
There is a feedback loop here that matters. Poor sleep worsens mood and anxiety the next day. Worse mood and anxiety make the next night harder. Over time this cycle can become self-sustaining, which is why treating sleep as a separate problem from mood often fails.
One clarification worth knowing: needing sleep medication long term is not the only path, and it is not the main one. For chronic insomnia, the first-line treatment recommended in clinical guidelines is a behavioral therapy, not a pill. More on that below.
What Is the Single Most Effective Approach for Sleep with Anxiety and Depression?
Cognitive behavioral therapy for insomnia, usually shortened to CBT-I, is the most effective established treatment for chronic insomnia. It is recommended as first-line care in major clinical guidelines, ahead of sleep medication.
CBT-I is not talk therapy in the general sense. It is a structured program, usually four to eight sessions, that targets the specific behaviors and thoughts keeping insomnia going. It typically includes:
- Sleep restriction — limiting time in bed to roughly the hours you actually sleep, then expanding gradually. This sounds counterintuitive but builds sleep pressure.
- Stimulus control — rebuilding the link between bed and sleep by getting out of bed when you cannot sleep.
- Cognitive work — addressing catastrophic thoughts about sleep, like “I will fall apart tomorrow.”
- Relaxation training — breathing, progressive muscle relaxation, or similar methods.
For people with both insomnia and depression, CBT-I has been studied as an add-on to depression treatment, and some research suggests it can improve both sleep and mood. The evidence is encouraging but not uniform across all studies, so it is best discussed with a clinician rather than assumed.
You can access CBT-I through a trained therapist, a sleep clinic, or in some cases structured digital programs. If you have significant depression or anxiety, it works best alongside treatment for those conditions, not instead of it.
How Do You Set Up Your Day So Sleep Comes Easier at Night?
Sleep is not something you do at night. It is the result of what you do all day. For someone with anxiety and depression, the daytime rhythm is often the most fixable part of the problem.
Wake at the same time every day
A consistent wake time anchors your body clock more powerfully than a consistent bedtime. Pick a time you can hold seven days a week, including weekends. This single habit does more for sleep timing than almost anything else.
Get light early
Morning light tells your brain it is daytime and helps set the timing of sleep later that night. Ten to thirty minutes of outdoor light in the morning is a reasonable target. On dark winter mornings, a light box may help some people, though evidence for it is stronger for seasonal mood patterns than for general insomnia.
Move your body, but not right before bed
Regular physical activity is associated with better sleep and better mood. The timing matters for some people — vigorous exercise within a couple of hours of bedtime can be activating. If that is you, move it earlier.
Watch caffeine and alcohol
Caffeine has a long half-life. A cup at 3 p.m. can still be affecting you at 9 p.m. Alcohol is more deceptive: it can make you fall asleep faster, then fragment sleep in the second half of the night and worsen anxiety the next morning. Many people with anxiety and depression find that reducing alcohol improves sleep more than they expect.
What Should You Do in the Hour Before Bed?
The hour before bed is where anxiety usually wins. The goal is not to force calm. It is to stop giving your mind new material to chew on.
A wind-down routine helps because it signals to your brain that the day is closing. It does not need to be elaborate. Dimming lights, putting screens away or at least out of arm’s reach, and doing something low-stimulation — reading, light stretching, a warm shower — is enough for many people.
If your mind starts racing the moment you lie down, that is a sign the processing is happening too late. Try scheduling a “worry time” earlier in the evening. Set a timer for ten or fifteen minutes, write down what is on your mind, and then close the notebook. The point is not to solve everything. It is to move the mental work out of the bed.
Breathing exercises can help some people. Slow breathing — around six breaths per minute — activates the calming branch of the nervous system. It is not a cure for anxiety, but it can lower the physical arousal that keeps you awake.
What If You Wake in the Middle of the Night?
Night waking is common with both anxiety and depression. What you do in those minutes matters more than most people realize.
If you wake and cannot fall back asleep within roughly fifteen to twenty minutes, get out of bed. Go to another room and do something quiet and boring in dim light until you feel sleepy, then return. This is the core of stimulus control, and it is one of the most evidence-supported techniques in sleep medicine.
What not to do: lie there checking the clock, scrolling your phone, or mentally reviewing tomorrow. Those behaviors teach your brain that the bed is a place for worry and alertness.
If you wake early and cannot return to sleep at all, and this happens most nights, that pattern is worth mentioning to a clinician. Early morning waking is a recognized feature of depression and may point to a need for treatment adjustment.
When Should You Get Professional Help?
Occasional bad nights are normal. A pattern that lasts three or more nights a week for three months or longer meets the general definition of chronic insomnia, and that is when professional support matters most.
Seek help if:
- Sleep problems have lasted weeks or months, not days
- You are relying on alcohol, over-the-counter sleep aids, or other substances to sleep
- Your mood is worsening, or you have thoughts of harming yourself
- You have symptoms of sleep apnea — loud snoring, gasping, or waking unrefreshed despite enough hours in bed
If you have thoughts of suicide or self-harm, contact a crisis line or emergency services right away. In the US, you can call or text 988 to reach the Suicide and Crisis Lifeline.
For most people with anxiety, depression, and ongoing insomnia, the effective plan combines treatment for the mood condition with CBT-I for the sleep problem. Medication may play a role, but it is usually not the first or only answer. Some antidepressants affect sleep — some are sedating, some are activating — so timing and choice are worth discussing with your prescriber.
Frequently Asked Questions
Can anxiety and depression cause insomnia?
Yes. Both conditions are strongly linked to insomnia, with anxiety typically making it hard to fall asleep and depression often causing early morning waking or unrefreshing sleep. The relationship runs both ways, since poor sleep also worsens mood and anxiety.
Is CBT-I better than sleeping pills for anxiety-related insomnia?
Clinical guidelines recommend CBT-I as first-line treatment for chronic insomnia, ahead of medication. Sleep medications can help short term, but CBT-I produces more lasting improvement because it changes the behaviors and thoughts that keep insomnia going.
What should I do if I wake up at 3 a.m. with racing thoughts?
If you cannot fall back asleep within about fifteen to twenty minutes, get out of bed and do something quiet in dim light until you feel sleepy. Staying in bed while anxious teaches your brain to associate the bed with worry.
How long does it take for sleep to improve with anxiety and depression?
Timelines vary widely and depend on the treatment, so no single number applies to everyone. CBT-I programs typically run several weeks, and many people notice meaningful change within that window, but improvement often depends on also treating the underlying mood condition.

