Skip to main content
Health Education

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.
Rx pill bottles and pills: the best medication for anxiety and insomnia

Key takeaways

  • Anxiety and insomnia are both common and often connected.

  • Prescription medications for anxiety and insomnia include benzodiazepines, sedative-hypnotics, certain antidepressants, melatonin receptor agonists, and orexin receptor antagonists.

  • Abruptly stopping anxiety or insomnia medication can lead to withdrawal symptoms and may be dangerous. Consult your healthcare provider for a safe tapering schedule.

If you experience insomnia and anxiety, you are not alone in wishing for a restful night’s sleep. Sleep problems affect as many as 30 to 40% of adults in a given year, and insomnia is the most common sleep disorder in the United States, according to the American Journal of Managed Care. 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. 

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 also use the card on refills. 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 can also cause many 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 sedative-hypnotics used to help people fall asleep (Ambien CR also helps you stay asleep). They’re only meant for short-term use and may cause side effects like dizziness, dry mouth, and next-day drowsiness. They also carry a black box warning due to the potential for complex sleep behaviors like sleepwalking.

Belsomra (suvorexant) and Dayvigo (lemborexant)

Belsomra (suvorexant) and Dayvigo (lemborexant) are orexin receptor antagonists that promote sleep by blocking the wake signal in the brain. Common side effects include abnormal dreams and fatigue.

Elavil (amitriptyline)

Though Elavil (amitriptyline) is FDA-approved for depression, this tricyclic antidepressant is sometimes prescribed off-label to aid sleep due to its sedating effect. Like all antidepressants, it carries a black box warning about suicidal thoughts and behaviors.

Lexapro (escitalopram)

Lexapro (escitalopram) is an antidepressant in the selective serotonin reuptake inhibitor (SSRI) group of drugs. It is used to treat anxiety and depression. Some people experience improved sleep, while others report insomnia as a side effect. Lexapro also has a black box warning about suicidal thoughts and behaviors.

Lunesta (eszopiclone)

Lunesta (eszopiclone) is a sedative-hypnotic that helps with both sleep onset and maintenance. It may cause an unpleasant taste in the mouth, and has a black box warning similar to Ambien.

Remeron (mirtazapine)

Remeron (mirtazapine) is a tetracyclic antidepressant that can be sedating. It may help with sleep, but it also comes with weight gain and a risk of suicidal thoughts. And, as an antidepressant, it has a black box warning about suicidal thoughts and behaviors.

Restoril (temazepam), Valium (diazepam), and Xanax (alprazolam)

Restoril (temazepam), Valium (diazepam), and Xanax (alprazolam) are all benzodiazepines, used for short-term anxiety and sleep issues. These medications are controlled substances and have the potential for abuse and dependence. They also carry black box warnings. Other benzodiazepines, such as Ativan (lorazepam), Klonopin (clonazepam), or Halcion (triazolam), are sometimes prescribed for the treatment of insomnia or anxiety.

Rozerem (ramelteon)

Rozerem (ramelteon) is a melatonin receptor agonist that mimics your body’s natural sleep hormone. It’s not habit-forming and may be a good fit for those avoiding controlled substances.

Silenor (doxepin)

Silenor (doxepin) is a tricyclic antidepressant used to treat people who wake up frequently during the night. It may cause sleepiness or nausea.

Sonata (zaleplon)

Sonata (zaleplon) is a sedative-hypnotic that helps people fall asleep but not stay asleep. Like Ambien and Lunesta, it carries a black box warning.

Trazodone

Trazodone is an antidepressant sometimes prescribed off-label for sleep. It may cause dizziness, dry mouth, and low blood pressure. As an antidepressant, it has a black box warning regarding suicidal thoughts and behaviors.

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 cognitive behavioral 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 (check with your healthcare provider before using a supplement)

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 waking up and doing anything that requires coordination and reaction skills, like working or driving. And you’ll need to avoid alcohol, too. 

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.