Skip to main content

What is the best medication for anxiety and insomnia?

Anxiety and insomnia can be linked. Learn which medications work best for treating anxiety and insomnia.

Anxiety and insomnia | Medications | Stopping medication | Other treatment | When to see a doctor 

If you experience insomnia and anxiety, you are not alone in wishing for a restful night’s sleep. Sleep problems such as insomnia affect as many as 30 to 40% of adults in a given year and is the most common sleep disorder in the United States. Insomnia can be short-term (lasting for less than 3 months), or long-term (occurring at least 3 days a week for 3 months or more). Anxiety is common, too. According to the Anxiety & Depression Society of America, almost 40 million people in the United States, or 18% of people, experience an anxiety disorder in a given year. What’s more, anxiety and insomnia are often closely linked. People with an anxiety disorder are more likely to have sleeping problems while experiencing stress. 

The good news is that there are ways to treat anxiety and insomnia. Nonmedicinal methods as well as prescription medications can be used to help reduce symptoms of anxiety and insomnia. 

Anxiety and insomnia

Anxiety 

Anxiety is an emotion that creates feelings of tension and worrying thoughts. It can also manifest as physical symptoms like increased blood pressure, sweating, shaking, dizziness, or a fast heartbeat. There are several types of anxiety, including:

  • Generalized anxiety disorder (GAD): This generalized type of severe, ongoing anxiety causes worries about many things and can interfere with daily life.
  • Panic disorder: Panic disorder is defined by intense episodes of fear, known as panic attacks, that generally last for several minutes at a time. 
  • Social Anxiety Disorder: This type of anxiety involves a fear of social settings.
  • Specific phobias: These are intense fears caused by certain triggers, such as fear of being in a crowd.
  • Obsessive-Compulsive Disorder (OCD): People with OCD have intrusive thoughts that cause anxiety, which leads to compulsions, which are behaviors done to control the anxiety. Compulsions may be repeated, like a ritual, and can impact daily life. 
  • Post-traumatic stress disorder (PTSD): This is a type of anxiety that can occur after exposure to a painful situation. 

Insomnia has been reported in people with various types of anxiety, including generalized anxiety disorder, OCD, and PTSD.

People with anxiety often have intrusive thoughts or worries that do not go away, and they may avoid certain situations. People with anxiety disorders often have sleep disturbances, including insomnia. Worrying causes people to frequently think about their concerns in bed, and this anxiety can prevent them from falling asleep. What’s more, worrying about falling asleep can create sleep anxiety that adds to the person’s sense of dread. Anxiety can also lead to nightmares, which can increase fear around going to sleep. Anxiety and insomnia can become a cycle of sorts, as worrying causes difficulty sleeping, which causes more anxiety, and more sleep difficulties. 

Insomnia

Getting enough quality sleep is important for many body functions. There are many sleep disorders, which are conditions that disrupt normal sleep patterns. Insomnia is the most common sleep disorder. People with insomnia may have difficulty falling asleep, staying asleep, and/or getting quality sleep. 

Insomnia can be a short-term or long-term problem. Short-term insomnia may last for several days or weeks and can be caused by stress or life changes. Chronic, or long-term, insomnia, occurs 3 or more nights a week and lasts more than 3 months. 

How much sleep do we need? According to the Centers for Disease Control and Prevention (CDC), adults 18 to 60 years old need at least 7 hours of sleep per night. Adults 61 to 64 years old need 7 to 9 hours of sleep each night, and adults 65 years and older need 7 to 8 hours of sleep per night. Inadequate sleep (6 hours or less on a given night) is associated with frequent mental distress, among other problems including heart disease, kidney disease, high blood pressure, diabetes, stroke, obesity, and depression.

As we can see, anxiety and insomnia are very common and are often related. Continue reading to learn more about how to address these common, often intertwined, conditions. 

The best medication for anxiety and insomnia

Your healthcare provider will take several factors into consideration before prescribing medication for anxiety and insomnia, such as your age, symptoms, other health conditions, family history, and other medications you take that may have potential drug interactions. Certain individuals, like older adults, may not be appropriate candidates for certain medications—or may need low doses rather than higher doses—due to factors such as age or other medical conditions. Your provider may also give you a thorough medical exam and look for an underlying cause of your anxiety or insomnia before deciding on what would be the most effective treatment for you. 

Because everyone is different, the best treatment for you may not be the best treatment for someone else. You can always use a free SingleCare card to save up to 80% on the cost of your medications, and you can use the card on refills, too. Categories of medications that can be used to treat symptoms of anxiety and insomnia include:

  • Benzodiazepines
  • Sedative-hypnotic drugs, including “Z-drugs”
  • Certain antidepressants
  • Melatonin receptor agonist
  • Orexin receptor antagonists

There are also several over-the-counter (OTC) sleeping pills. Most of these sleeping medications contain antihistamines, such as diphenhydramine or doxylamine. If you have any medical conditions or take any other medications, you should check with your healthcare professional or pharmacist before using an OTC sleeping pill. They may be effective for occasional use, but tolerance develops quickly. They also can cause a lot of unpleasant side effects, especially in older people, like dizziness, confusion, and next day drowsiness, which could lead to falls and injury. 

The following drugs are prescription medications used to treat anxiety and/or insomnia.

Ambien (zolpidem) or Ambien CR (zolpidem extended-release)

Ambien (zolpidem) and Ambien CR (zolpidem extended-release) are classified as sedative-hypnotics. Ambien is used as a short-term treatment for adults who have trouble falling asleep. Ambien CR is used as a short-term treatment for adults who have trouble falling asleep and/or staying asleep. Ambien or Ambien CR are both indicated to be used only for short periods of time and should not be used for a long time. Common side effects include headache, drowsiness, dizziness, a drugged feeling, back pain, diarrhea or constipation, dry mouth, and flu-like symptoms. Ambien and Ambien CR are controlled substances, so they have the potential for substance abuse and dependence. Prescribers will consider past drug use or alcohol use and the potential for abuse and dependence before prescribing a controlled substance. 

These drugs have a black box warning, which is the strongest warning required by the US Food and Drug Administration (FDA). These medications can cause complex sleep behaviors, such as sleep-walking, sleep-driving, and other activities that are done while not fully awake. Some of these behaviors can result in serious injuries, including death. People who experience complex sleep behavior should stop taking Ambien or Ambien CR.

Belsomra (suvorexant)

Belsomra (suvorexant) is classified as an orexin receptor antagonist. It is used to treat adults with insomnia who have difficulty falling and/or staying asleep. It is a controlled substance. Some of the most common side effects include sleepiness, headache, dizziness, abnormal dreams, diarrhea, dry mouth, and cough.

Dayvigo (lemborexant)

Dayvigo (lemborexant) is classified as an orexin receptor antagonist. It can be used to treat insomnia in adults who have difficulty falling and/or staying asleep. It is a controlled substance. Common side effects include sleepiness, fatigue, headache, and abnormal dreams.

Elavil (amitriptyline)

Elavil (amitriptyline) is classified as a tricyclic antidepressant medication. It is FDA-approved to treat depression (also known as major depressive disorder), but sometimes healthcare providers prescribe this medication off-label for other uses. Off-label prescribing is when a drug is prescribed for a purpose that is not FDA-approved. Elavil causes sedation as a side effect, so sometimes healthcare providers prescribe it to people who have trouble sleeping. Some other common side effects include dry mouth, dizziness, constipation, blurred vision, heart palpitations, fast heart rate, impaired coordination, increased appetite, nausea, vomiting, sweating, and weakness. 

Elavil has a black box warning. Like all antidepressants, Elavil may cause an increased risk of suicidal thoughts or behaviors, especially in children and young adults. Patients of any age who take an antidepressant should be closely monitored by family members, close friends, and caregivers for any changes in mood and behavior and suicidal thoughts and behaviors. Report any changes to the doctor right away or get emergency help if needed.

Lexapro (escitalopram)

Lexapro (escitalopram) is a selective serotonin reuptake inhibitor (SSRI) antidepressant. SSRI antidepressants like Lexapro are not thought of as insomnia treatments, but in some cases may be beneficial. Lexapro is FDA-approved to treat depression and anxiety. SSRIs may be helpful in people with insomnia and sleep apnea. SSRIs also have fewer side effects than other options—however, they have the black box warning for suicidal thoughts and behaviors, like all antidepressants. Common Lexapro side effects may include headache, nausea, sexual problems, sleepiness, insomnia, dry mouth, fatigue, sweating, yawning, constipation or diarrhea, dizziness, appetite loss, and abnormal dreams. In clinical studies, 12% of people who took Lexapro for anxiety experienced insomnia as a side effect, so this drug will not work for everyone to help insomnia—however, 13% of people who took Lexapro for anxiety experienced somnolence, which is a feeling of drowsiness and strong desire for sleep.

Lunesta (eszopiclone)

Lunesta (eszopiclone) is a sedative-hypnotic and controlled substance. It is used to treat insomnia in adults, for those who have trouble falling and/or staying asleep. Common side effects include an unpleasant taste in the mouth, headache, sleepiness, dry mouth, dizziness, nausea, indigestion, diarrhea, and viral infection. 

Like Ambien and Ambien CR, Lunesta has a black box warning about complex sleep behaviors. 

Remeron (mirtazapine)

Remeron (mirtazapine) is classified as a tetracyclic antidepressant. It is FDA-approved to treat depression in adults, but some healthcare providers prescribe it off-label for insomnia due to its sedative effect. Common side effects include sleepiness, dry mouth, increased appetite, weight gain, weakness, dizziness, abnormal dreams, sleepwalking, muscle and back pain, and tremor. Like all antidepressants, Remeron has a black box warning about suicidal thoughts and behaviors.

Restoril (temazepam)

Restoril (temazepam) is classified as a benzodiazepine, and it is a controlled substance. It is approved for short-term use in adults with insomnia. Like all benzodiazepines, Restoril should not be used for an extended period. Common side effects include drowsiness, fatigue, weakness, dizziness, anxiety, incoordination, memory loss, confusion, involuntary muscle contractions, slurred speech, and double vision. 

All benzodiazepines have a black box warning. The warning states that the use of benzodiazepines in combination with opioid pain medications can result in breathing problems, coma, and death. A benzodiazepine should only be used in combination with an opioid when no other options are available, and the patient will be closely monitored. This black box warning also notes that benzodiazepines have the potential for abuse, misuse, and addiction, which can lead to overdose and death. Benzodiazepines can also cause physical dependence, and people can have benzodiazepine withdrawal reactions (which can be life-threatening) when stopping a benzodiazepine. Stopping a benzodiazepine should be done slowly and safely—not abruptly—with a taper schedule from the healthcare provider. 

Rozerem (ramelteon)

Rozerem (ramelteon) is a melatonin receptor agonist—it works like melatonin to help people fall asleep. It is FDA-approved for use in adults, but not for children. Common side effects include dizziness, sleepiness, fatigue, nausea, headache, and a worsening of insomnia. 

Silenor (doxepin)

Silenor (doxepin) is a tricyclic antidepressant used in adults with insomnia who have difficulty staying asleep. Common side effects may include sleepiness, sedation, nausea, and upper respiratory tract infection.

Sonata (zaleplon)

Sonata (zaleplon) is a sedative-hypnotic used in adults who have trouble falling asleep. It is a controlled substance and is only approved to be used for short periods of time. Some common side effects may include headache, dizziness, muscle weakness, nausea, sleepiness, stomach pain, eye pain, tremor, nightmares, and memory loss. Like Ambien and Lunesta, Sonata has a black box warning about complex sleep behaviors. 

Trazodone

Trazodone is an antidepressant that is used to treat depression in adults, but it is sometimes prescribed off-label for insomnia. Common side effects may include sleepiness, dry mouth, headache, dizziness, nausea, vomiting, blurry vision, sexual problems, diarrhea or constipation, low blood pressure, and swelling. Like all antidepressants, trazodone has a black box warning about suicidal thoughts and behaviors. 

Valium (diazepam)

Valium (diazepam) is a benzodiazepine. It is FDA-approved to treat anxiety (in adults and children 6 months and older), as well as several other conditions such as muscle spasms and acute alcohol withdrawal. Common side effects may include drowsiness, fatigue, weakness, impaired coordination, confusion, depression, headache, tremor, memory loss, constipation, nausea, slurred speech, and involuntary muscle contractions. 

Valium is a controlled substance and has the same black box warning as temazepam. 

Xanax (alprazolam)

Xanax (alprazolam) is a benzodiazepine. It is an anti-anxiety medication that can be used in adults for generalized anxiety disorder or panic disorder. It is sometimes prescribed off-label to children 7 years and older for short-term anxiety treatment. Common side effects include drowsiness, fatigue, impaired coordination, irritability, problems with memory and concentration, appetite changes, confusion, slurred speech, dizziness, dry mouth, and drooling. 

Xanax is a controlled substance and has the same black box warning as temazepam and diazepam.

Stopping medication 

Always consult your healthcare provider before stopping a medication. Many medications for anxiety or sleep must be tapered slowly. Stopping abruptly (known as quitting “cold turkey”) can cause withdrawal symptoms and can be dangerous in some cases. Your healthcare professional will provide you with a tapering schedule so that you can stop taking the medicine slowly and safely, with minimal risk of withdrawal symptoms. Once you stop the medication, your anxiety and/or insomnia may return, so you’ll want to keep in communication with your doctor about further steps that may be needed. And you’ll also benefit from continuing nonmedicinal methods such as therapy, relaxation, and meditation. 

Other treatment options for anxiety and insomnia 

There are many nonprescription methods that you can try to help with symptoms of anxiety and/or insomnia. You can always discuss options with your healthcare provider, and try one or more of the following methods, in combination with prescription medication, if prescription medication is needed.

  • Therapy (the type of therapy will depend on the exact condition being treated)
  • Meditation, relaxation, breathing techniques, acupuncture, massage therapy, yoga
  • Improving sleep hygiene habits
  • Lifestyle changes, such as eating a healthy diet, exercising regularly, stopping smoking, and limiting caffeine and alcohol
  • Dietary supplements such as melatonin, which helps control the sleep cycle

When to speak with a doctor

If you are experiencing anxiety and insomnia—or even if you are not sure if your symptoms are temporary stress or an anxiety condition, consult your health care provider for medical advice and a diagnosis. An occasional sleepless night is not generally a cause for concern, but when symptoms of anxiety and/or insomnia affect your daily life, it’s best to get help. 

If your healthcare professional prescribes medication for your condition, read the prescription label carefully and take it exactly as directed. Also, read the medication guide or information leaflets that come with your prescription and ask your doctor if you have any questions or need more information. Do not take more medicine than prescribed, or for longer than prescribed. Many of these medications are not indicated for long-term use. You should also make sure that when you take sleeping medication, you have time for a full night’s sleep before you have to wake up and do anything that requires coordination and reaction skills like working or driving. 

Inform your doctor if you experience adverse effects, especially if you have troublesome side effects that do not subside. And to avoid withdrawal symptoms, always consult your healthcare provider before stopping your medication, rather than stopping it abruptly.