Some links may earn us a commission; our work is independent.

Anxiety and Sleep: How Each Can Affect the Other

Anxiety can affect falling asleep, nightmares, nighttime panic, sleep timing, and daytime functioning. Learn what else to rule out and when to seek care.

Tired woman sitting near blurred boyfriend on bed in evening

The short version

  • Anxiety can delay sleep, trigger awakenings, and worsen daytime fatigue, while insufficient sleep can intensify anxiety.
  • Identify the actual pattern and address sleep opportunity, habits, anxiety treatment, and coexisting sleep disorders together.
  • Persistent impairment, unsafe substance or medication use, or a mental-health crisis requires professional care.

Anxiety and sleep can affect each other in both directions. Worry, threat monitoring, muscle tension, and panic can make sleep harder. Poor or irregular sleep can make emotions harder to regulate and anxious thoughts more difficult to manage. But sleep trouble does not prove that you have an anxiety disorder, and anxiety should not be assumed to explain every nighttime symptom.

It helps to look at the specific pattern, what else might cause it, and whether the anxiety, sleep problem, or both need treatment.

Everyday worry or an anxiety disorder?

Anxiety is a normal response to uncertainty or stress. A deadline, conflict, illness, or major change may lead to a few restless nights. This type of situational worry often eases when the event passes or the person adapts.

An anxiety disorder involves more than occasional stress. The fear or worry is persistent, difficult to control, out of proportion to the situation, or linked to avoidance and meaningful impairment. For generalized anxiety disorder, clinicians look for excessive anxiety and worry on most days for at least 6 months, along with related symptoms. Sleep disturbance may be one symptom, but it is not enough for a diagnosis by itself 1.

You can also have sleep-focused worry without a broader anxiety disorder. Repeatedly checking the time, calculating the hours left, or fearing the consequences of a bad night can turn the bed into a cue for alertness. This is especially relevant in chronic insomnia, which has its own assessment and treatment. See our detailed guide to anxiety and insomnia for that specific pattern.

Sleep patterns that can occur with anxiety

Anxiety does not look the same at night for everyone. It may accompany one or several of the following patterns.

Trouble falling asleep or returning to sleep

Some people replay conversations, plan for possible problems, monitor bodily sensations, or feel physically tense at bedtime. Others fall asleep but wake and begin worrying. If this happens at least 3 nights a week for at least 3 months, despite adequate opportunity for sleep, and causes daytime impairment, a clinician may assess for chronic insomnia rather than treating it as a symptom to simply wait out 2.

Distressing dreams and nightmares

Stress and anxiety can coincide with vivid or distressing dreams. Repeated nightmares may also occur with trauma-related disorders, medicines or substance changes, other mental health conditions, or as a nightmare disorder in their own right. Not every nightmare means that a person has post-traumatic stress disorder.

When nightmares are frequent and impairing, treatment may address both their cause and the dream pattern. Imagery rehearsal therapy, which involves rewriting and practicing a less distressing version of a recurring nightmare while awake, is one established behavioral option 3.

Waking in panic

A nocturnal panic attack is a sudden awakening with intense fear and physical symptoms such as a racing heart, sweating, trembling, breathlessness, chest discomfort, dizziness, or a sense of catastrophe. Unlike a nightmare, the person wakes in panic without first recalling a frightening dream.

Recurrent episodes need proper assessment. Sleep apnea, reflux, asthma, abnormal heart rhythms, seizures, night terrors, and other conditions can resemble nocturnal panic. A clinician should not diagnose it from symptoms alone, particularly when the episodes are new or the physical symptoms have not been evaluated 4.

Irregular sleep timing

Anxiety may lead someone to stay up seeking reassurance, delay bedtime to avoid distressing thoughts, sleep late after a difficult night, or nap to recover. Those changes can further shift sleep timing. However, a persistent preference for much later sleep and wake times may point to a circadian rhythm issue, not just anxiety.

Difficult days after difficult nights

Poor sleep may bring fatigue, irritability, slower thinking, and less tolerance for uncertainty. That can make ordinary stress feel harder to manage. True sleepiness, meaning a tendency to doze rather than simply feeling drained, is also a safety concern when driving or operating machinery.

Why the relationship can run both ways

Across anxiety-related disorders, research finds substantial differences in self-reported sleep and smaller but measurable differences in objective sleep measures. The pattern varies by disorder, so there is no single "anxious sleep" profile 5.

Longitudinal research also associates insomnia with a higher later risk of anxiety and other mental health disorders 6. This does not mean that every poor night causes anxiety, or that treating sleep alone will resolve every anxiety disorder. These studies show a meaningful relationship, but a person's biology, behavior, health, environment, and existing conditions all matter.

Explanations involving "high cortisol" or an "overactive nervous system" are often presented online as universal answers. Human stress and sleep systems are more complicated. Symptoms alone cannot show whether a particular hormone is high, and routine cortisol testing is not how clinicians diagnose an anxiety disorder or most sleep disorders.

What else should be considered?

Several conditions can produce restless nights, physical alarm symptoms, or daytime distress. Anxiety may coexist with them, but it does not automatically cause them.

  • Obstructive sleep apnea: Loud snoring, witnessed breathing pauses, gasping, morning headaches, dry mouth, or marked daytime sleepiness warrant assessment. An awakening caused by restricted breathing may feel like panic.

  • Restless legs syndrome: An urge to move the legs, usually worse during rest in the evening and temporarily relieved by movement, is different from generalized tension.

  • A circadian rhythm problem: Someone who sleeps well and for an adequate duration on a consistently later schedule may have a timing mismatch rather than anxiety-driven insomnia.

  • Depression: Early waking, sleeping much more or less, low mood, loss of interest, and fatigue may occur together. Anxiety and depression commonly overlap.

  • Bipolar disorder: A decreased need for sleep with unusually high or irritable mood, racing thoughts, fast speech, increased activity, grandiosity, or risky behavior can signal mania or hypomania. This is different from wanting to sleep but being unable to do so 7.

  • Trauma-related symptoms: Hypervigilance, avoidance, intrusive memories, and trauma-linked nightmares call for trauma-informed assessment.

  • Medicines and substances: Stimulants, decongestants, corticosteroids, some antidepressants, thyroid medicines, nicotine, caffeine, alcohol, cannabis, and withdrawal from sedating substances can change sleep or anxiety. Do not stop a prescribed medicine abruptly without medical advice.

  • Other medical conditions: Pain, thyroid disease, menopausal symptoms, reflux, asthma, heart rhythm problems, and other illnesses may disrupt sleep or create sensations that resemble anxiety.

What a clinician may ask

A primary care, mental health, or sleep clinician may ask when the problem began, what happens before and during an episode, how often it occurs, how much sleep you get, and how it affects the day. They may also review:

  • Bedtime, wake time, naps, work schedule, travel, and light exposure

  • Snoring, gasping, limb sensations, dream recall, unusual movements, or confusion

  • Caffeine, nicotine, alcohol, cannabis, supplements, and prescribed or nonprescribed drugs

  • Symptoms of depression, bipolar disorder, trauma-related disorders, panic, and suicidal thinking

  • Medical history, recent life events, pregnancy, and menopause when relevant

Keeping a sleep diary for 1 to 2 weeks can reveal whether the main problem is timing, wakefulness, or insufficient sleep opportunity. Input from a bed partner may help when breathing pauses or unusual behaviors are suspected.

Sleep testing is not routine for every case of anxiety or insomnia. It may be appropriate when symptoms suggest sleep apnea, a movement disorder, seizures, or an unusual parasomnia 2.

Steps you can take now

These steps can support sleep and anxiety management while you arrange care if needed. They are not substitutes for treatment of a persistent disorder.

  1. Anchor your wake time. Get up at roughly the same time each day and allow enough time for sleep. Avoid repeatedly moving bedtime earlier after a poor night.

  2. Use light and activity deliberately. Seek morning daylight, especially if your schedule is drifting later. Exercise regularly, but adjust the timing if intense late activity leaves you alert.

  3. Move planning out of bed. Set aside a brief period earlier in the evening to write down worries, the next action you can take, and what must wait. The goal is not to eliminate thoughts but to stop making bedtime the planning session.

  4. Create a low-stimulation transition. Dim the lights and choose a repeatable quiet activity before bed. If relaxation exercises make you more focused on symptoms, try something neutral such as reading or calm audio instead.

  5. Be intentional with caffeine. Reduce the dose, move it earlier, or avoid it if it worsens palpitations, panic, or sleep. Sensitivity and clearance vary considerably.

  6. Do not force sleep. If you are awake and becoming frustrated, leave the bed for a quiet activity in dim light and return when sleepy, when it is safe and practical to do so.

  7. Track patterns without constant monitoring. A simple daily diary is more useful than checking the clock or wearable throughout the night. Consumer sleep scores are estimates, not diagnoses.

  8. Protect next-day safety. Do not drive or perform hazardous work when you are struggling to stay awake.

Basic sleep habits can help, but sleep hygiene alone is not the recommended treatment for chronic insomnia 8.

Treat the sleep problem and anxiety in parallel

When both are persistent, care works best when each track is assessed rather than waiting for one to disappear first.

Psychological treatments

Cognitive behavioral therapy (CBT) helps people examine anxious predictions, reduce avoidance, and practice new responses. Exposure-based methods may be part of treatment for panic, phobias, or trauma-related symptoms. For generalized anxiety disorder and panic disorder, evidence-based psychological treatment and medication are both options, chosen according to severity, preference, prior response, and clinical factors 9.

Cognitive behavioral therapy for insomnia (CBT-I) is a multicomponent treatment for chronic insomnia, and it is strongly recommended by the American Academy of Sleep Medicine 8. If chronic insomnia is your main pattern, the anxiety and insomnia guide explains the treatment in detail.

Recurrent nightmares and nocturnal panic may need more specific behavioral treatment. Imagery rehearsal can target nightmares, while panic-focused CBT addresses catastrophic interpretations, avoidance, and fear of bodily sensations. The exact approach should follow a careful diagnosis.

Medication

Medication decisions should consider the diagnosis, medical history, other drugs and substances, pregnancy, age, fall risk, breathing disorders, and personal preference.

Antidepressants such as selective serotonin reuptake inhibitors (SSRIs) are commonly used for anxiety disorders. They may initially cause activation, nausea, or sleep changes, and their anxiety benefit develops over time. A prescriber can adjust the medicine, dose, or timing if sleep worsens 9.

Prescription sleep medicines may have a limited role for selected people, usually as part of a broader plan. They are not interchangeable, and a medicine that helps someone fall asleep does not necessarily treat an anxiety disorder.

  • Benzodiazepines can cause sedation, impaired coordination, tolerance, physical dependence, and withdrawal. The FDA requires boxed warnings about abuse, misuse, addiction, physical dependence, and withdrawal. NICE advises using them for generalized anxiety disorder only as a short-term measure during a crisis 9. Do not increase the dose, combine them with alcohol or other sedatives, or stop them suddenly without prescriber guidance 10.

  • Z-drugs such as zolpidem, eszopiclone, and zaleplon can cause next-day impairment and rare complex sleep behaviors, including sleepwalking or sleep driving, that have caused serious injuries and deaths. Seek prescriber advice promptly after any such event 11.

  • Sedating antihistamines such as diphenhydramine can cause next-day sedation and anticholinergic effects. Evidence does not support diphenhydramine as a treatment for chronic insomnia 12.

Alcohol, cannabis, melatonin, and supplements

Feeling sedated is not the same as receiving restorative or reliable treatment.

  • Alcohol may shorten sleep onset but can fragment later sleep. Combining it with benzodiazepines, sleep medicines, opioids, or other sedatives can dangerously increase impairment and breathing risk 13.

  • Cannabis may make some people feel sleepy, but products, doses, and effects vary. The evidence is not sufficient to recommend cannabis or cannabinoids routinely for sleep disorders, and regular use or withdrawal may worsen sleep for some people 14.

  • Melatonin is a timing signal, not a general sedative or established treatment for an anxiety disorder. It may be useful for selected circadian timing problems, but evidence for chronic insomnia is limited and long-term safety data are incomplete. It can also interact with medicines 15.

  • Herbal and other supplements are not automatically safe. Evidence for valerian and chamomile is inconsistent, product contents vary, and some products interact with medicines or cause harm. Kava has been linked to serious liver injury, and L-tryptophan can contribute to serotonin toxicity when combined with medicines that raise serotonin 15.

Tell your clinician or pharmacist about every sleep aid, supplement, and substance you use.

When to seek care

Arrange routine care if anxiety or sleep problems recur for several weeks, interfere with work, study, relationships, or caregiving, or lead you to rely regularly on alcohol, cannabis, antihistamines, or prescription sedatives. Seek assessment sooner for loud snoring with pauses, recurrent gasping, restless legs symptoms, frequent nightmares, or repeated nocturnal panic.

Seek prompt or same-day medical advice for:

  • New severe functional decline or inability to complete essential daily activities

  • Markedly reduced need for sleep with unusual energy, agitation, rapid speech, racing thoughts, grandiosity, or risky behavior

  • Severe medication effects, a complex sleep behavior, or possible withdrawal from alcohol, benzodiazepines, or another sedating drug

  • Sleepiness severe enough that you may doze while driving, working, or caring for someone. Stop the hazardous activity and arrange safe transport.

Get emergency help now for suicidal intent, a plan to harm yourself or someone else, an inability to stay safe, extreme agitation, psychosis, or dangerously risky behavior. New or severe chest pain, fainting, severe shortness of breath, weakness on one side, or other possible medical emergencies should not be assumed to be panic. Contact local emergency services or go to the nearest emergency department 16.

Frequently asked questions

Can anxiety cause insomnia?

Anxiety can contribute to difficulty falling or staying asleep, especially when worry and monitoring continue in bed. But insomnia can have several causes and can become an independent problem. Persistent symptoms deserve their own assessment.

Can poor sleep make anxiety worse?

Yes, a poor night can make emotional regulation and coping more difficult the next day, and insomnia is associated with later anxiety. That does not mean one bad night creates an anxiety disorder.

Why do I wake up with a racing heart?

Panic is one possibility, but sleep apnea, reflux, asthma, heart rhythm problems, medicines, substances, nightmares, and other conditions can cause similar awakenings. Recurrent or new episodes, especially with chest pain, fainting, or severe breathlessness, need medical assessment.

Should I take melatonin for anxiety-related sleep trouble?

Melatonin is not an established anxiety treatment. Whether it is appropriate depends on the sleep pattern, timing, other medicines, and health history. Ask a clinician or pharmacist before using it regularly.

Sources

Evidence cited in this article.

16 sources
  1. Generalized Anxiety Disorder: What You Need to Know (opens in a new tab)
    National Institute of Mental HealthGovernment source
  2. VA/DoD Clinical Practice Guideline for the Management of Chronic Insomnia Disorder and Obstructive Sleep Apnea (opens in a new tab)
    U.S. Department of Veterans Affairs and U.S. Department of DefenseGovernment source
  3. Position Paper for the Treatment of Nightmare Disorder in Adults: An American Academy of Sleep Medicine Position Paper (opens in a new tab)
    Journal of Clinical Sleep MedicineResearch
  4. Assessment and Treatment of Nocturnal Panic Attacks (opens in a new tab)
    Sleep Medicine ReviewsResearch
  5. Sleep in the Anxiety-Related Disorders: A Meta-Analysis of Subjective and Objective Research (opens in a new tab)
    Sleep Medicine ReviewsResearch
  6. Insomnia as a Predictor of Mental Disorders: A Systematic Review and Meta-Analysis (opens in a new tab)
    Sleep Medicine ReviewsResearch
  7. Bipolar Disorder (opens in a new tab)
    National Institute of Mental HealthGovernment source
  8. Behavioral and Psychological Treatments for Chronic Insomnia Disorder in Adults: An American Academy of Sleep Medicine Clinical Practice Guideline (opens in a new tab)
    Journal of Clinical Sleep MedicineResearch
  9. Generalised Anxiety Disorder and Panic Disorder in Adults (opens in a new tab)
    National Institute for Health and Care ExcellenceGovernment source
  10. FDA Requiring Boxed Warning Updated to Improve Safe Use of Benzodiazepine Drug Class (opens in a new tab)
    U.S. Food and Drug AdministrationGovernment source
  11. FDA Adds Boxed Warning for Risk of Serious Injuries Caused by Sleepwalking With Certain Prescription Insomnia Medicines (opens in a new tab)
    U.S. Food and Drug AdministrationGovernment source
  12. Clinical Practice Guideline for the Pharmacologic Treatment of Chronic Insomnia in Adults (opens in a new tab)
    Journal of Clinical Sleep MedicineResearch
  13. Alcohol-Medication Interactions: Potentially Dangerous Mixes (opens in a new tab)
    National Institute on Alcohol Abuse and AlcoholismGovernment source
  14. Cannabis and Sleep Disorders: What Clinicians Need to Know (opens in a new tab)
    American Academy of Sleep MedicineProfessional guidance
  15. Sleep Disorders and Complementary Health Approaches (opens in a new tab)
    National Center for Complementary and Integrative HealthGovernment source
  16. Frequently Asked Questions About Suicide (opens in a new tab)
    National Institute of Mental HealthGovernment source

Keep reading

More on Sleep and Mental Health

Open Sleep and Mental Health →