Resources
Can't sleep, racing thoughts: the anxiety loop at night
You lie down exhausted, and your mind switches on. Tomorrow's tasks, an awkward conversation, a worry you forgot all day. The more you try to force sleep, the more awake you feel. This is the anxiety-insomnia loop, and it is one of the most common things people describe to a psychiatrist. Here is why it happens at night and what actually helps.
Medically reviewed by Shariq Refai, MD, MBA, FAPA, board certified psychiatrist · Last reviewed June 8, 2026 · Editorial policy

Why your mind races the moment you lie down
During the day your attention is occupied: work, people, screens, errands. All of that gives anxious thoughts no room. The second you lie down in a dark, quiet room with nothing to do, the distractions disappear and the mind fills the space with whatever it was holding back.
There is a physical piece too. Anxiety keeps the nervous system in a low-grade state of alert, scanning for threats. Sleep requires the opposite: the body has to feel safe enough to power down. When you are wound up, the system will not make that switch, so you lie there alert and frustrated.
Add the clock. You glance at the time, calculate how little sleep is left, and the pressure to fall asleep climbs. That pressure is itself activating, which is the cruel twist: trying hard to sleep is one of the surest ways to stay awake.
The anxiety-insomnia loop
Anxiety and insomnia do more than coexist. They drive each other. Worry makes it hard to fall and stay asleep. Then a short, fragmented night leaves you more reactive, more irritable, and more anxious the next day, which sets up another rough night.
Over time the bed itself can become a trigger. After enough nights of lying awake and frustrated, your brain starts to associate the bed with being wired rather than with rest. Now climbing in actually cues alertness, and the loop tightens.
Breaking the cycle usually means working on both ends: calming the nighttime activation and treating the daytime anxiety underneath it. Education on the anxiety side is available free at AnxietyResource.org.
What helps tonight
If you have been lying awake for what feels like more than twenty minutes, get up. Go to another room, keep the lights low, and do something quiet and boring until you feel sleepy, then return to bed. This keeps the bed linked to sleep rather than to frustration.
Take the pressure off. Tell yourself that resting quietly is still recovery and that one rough night will not wreck you. Slow your breathing with a longer exhale, in for four counts and out for six, which nudges the nervous system toward calm. If worries keep circling, write them down on paper with a one-line next step beside each, so your brain can stop rehearsing them.
Keep the screen out of it. The content keeps your mind engaged and the light works against the wind-down. These moves ease a single bad night, but they are not a cure for a pattern.
What actually fixes it
The durable fix is treating the loop at its root rather than chasing sleep. For chronic insomnia, the best-supported treatment is cognitive behavioral therapy for insomnia, often called CBT-I. It retrains the sleep system through consistent timing, reducing time spent awake in bed, and changing the anxious thinking around sleep. It outperforms sleeping pills over the long run.
When anxiety is the engine, treating the anxiety often improves the sleep along with it. That can mean therapy, and when appropriate, a non-controlled medication such as an SSRI. The daytime basics matter more than people expect: a consistent wake time, morning light, limiting caffeine after midday, and a real wind-down before bed.
One honest note on medication. We do not prescribe controlled substances, including benzodiazepines and the controlled sleep agents people often ask for. They can backfire over time and tend to worsen the underlying problem. Well-supported alternatives exist, and you can read plain-language summaries at PsychiatryRx.org.
When it is a disorder, not a rough patch
A few bad nights during a stressful stretch are normal. The line to watch is duration and impact. When trouble sleeping shows up at least three nights a week for three months or more, and it is dragging on your days, that meets the picture of an insomnia disorder and is worth an evaluation.
It is also worth getting checked when anxiety is clearly driving the nights, when you dread bedtime, or when daytime worry is itself interfering with life. An evaluation untangles whether the core problem is anxiety, insomnia, or both, since the plan differs.
If sleeplessness comes with hopelessness or any thoughts of self-harm, do not wait. Call or text 988, or call 911.
How care works at shrinkMD
shrinkMD is online psychiatry for adults 18 and older, currently serving Maine and Nebraska, with more states coming soon. The first visit is a full evaluation by secure video, usually 45 to 60 minutes, with a board-certified clinician who looks at both the sleep and the anxiety and builds one plan that addresses the loop.
Fees are flat and published up front, with no insurance, so you know the cost before booking. We accept HSA and FSA funds and can provide superbills if you want to seek out-of-network reimbursement on your own.
The aim is real sleep that holds, reached by quieting the nervous system that is keeping you up, rather than sedating you through the night.
Key takeaways
What to remember
- Racing thoughts take over at night because the day's distractions are gone and the body is finally still.
- Anxiety and insomnia feed each other: worry keeps you awake, and poor sleep makes the next day more anxious.
- Tonight, get out of bed if you cannot sleep, lower the pressure to perform, and slow your exhale.
- The durable fix is CBT-I plus treating the underlying anxiety, not chasing a single good night.
- Trouble sleeping three nights a week for three months, with daytime impact, is worth a psychiatric evaluation.
Keep exploring
Related reading
Frequently asked questions
Good questions, clear answers
Why do my thoughts race at night when I try to sleep?
During the day, work and screens keep anxious thoughts at bay. At night, in a dark, quiet room with nothing to do, those distractions vanish and the mind fills the space with worry, while an alert nervous system resists powering down.
How do I stop racing thoughts so I can sleep?
If you have been awake more than twenty minutes, get up and do something quiet and low-lit until sleepy. Slow your exhale, write worries down with a next step, keep screens out of bed, and ease the pressure to force sleep.
Is anxiety insomnia a real condition?
Anxiety and insomnia often occur together and drive each other. Chronic insomnia is a recognized disorder, and anxiety disorders frequently include sleep trouble. An evaluation sorts out which is the main driver.
What is the best treatment for anxiety that keeps me awake?
Cognitive behavioral therapy for insomnia, known as CBT-I, is the best-supported sleep treatment, and treating the underlying anxiety with therapy or a non-controlled medication often improves sleep along with it.
Should I take sleeping pills for anxiety insomnia?
We do not prescribe controlled sleep medications or benzodiazepines, since they can worsen the underlying problem over time. Well-supported alternatives include CBT-I and treating the anxiety directly.
When does trouble sleeping become a disorder?
When it happens at least three nights a week for three months or longer and affects your daytime functioning, it meets the picture of an insomnia disorder and is worth an evaluation.
Why does forcing myself to sleep make it worse?
Trying hard to sleep raises pressure and arousal, which is activating. The harder you push, the more awake you feel. Lowering the stakes and getting out of bed when wired works better.
Can online psychiatry help with sleep and anxiety?
Yes. A video evaluation can address both the anxiety and the sleep in one plan. Research shows video psychiatry matches in-person care for anxiety in most adults.
Sources
Sources and further reading
When a question turns into a decision
Meet a board certified psychiatrist by video as clinician availability allows. Join the waiting list to go first when booking opens in your state.
Join Our Waiting List