The best medication for anxiety and insomnia is likely to be different for each individual. Sleep aids, antidepressants, and other medications can address both anxiety and insomnia.

Anxiety and insomnia are both significant public health concerns. One-third of adults in the United States report not reaching the recommended amount of sleep, while about 20% live with a mental illness.

Just as anxiety can make it difficult to fall and stay asleep, sleep deprivation can make anxiety worse. Both can impact a person physically, mentally, and emotionally.

Certain prescription medicines can treat anxiety and sleep problems, such as insomnia.

This article explores medications for anxiety and insomnia, their side effects, risks, and more.

A person taking a dose of medication from a pill box.Share on Pinterest
Fly View Productions/Getty Images

Anxiety is an emotion that involves feelings of worry, tension, and uneasiness. Most people experience some level of anxiety from time to time.

Feelings of intense distress and fear become irrational, persistent, and excessive to the point that they hinder people with anxiety disorders from performing their daily activities. These feelings are out of proportion to the actual situation and are challenging to control.

Insomnia, characterized by a person’s inability to fall and stay asleep, is the most common sleep disorder. Doctors have long recognized sleep problems to be a symptom of anxiety disorders. Insomnia is also an independent risk factor for the development of anxiety.

People with anxiety commonly present with insomnia symptoms, sleep apnea, poor sleep quality, and excessive sleepiness while awake.

Excessive worry can keep people up and interfere with their sleep. Moreover, this “hyperarousal” is a critical component that contributes to the development of insomnia.

Healthcare professionals will usually recommend lifestyle changes and behavioral therapies as the first course of action for people experiencing anxiety and insomnia. If this doesn’t help, they may then prescribe medications.

Learn more about treatments for anxiety.

The type of medication a doctor recommends will depend on a person’s age, health status, personal preferences, and severity of symptoms. They may decide to treat the two conditions separately or simultaneously.

There are different types of medication doctors may prescribe for anxiety and insomnia. These include:

  • Sleep aids (non-benzodiazepines): Sleep aids are prescription medications individuals with insomnia widely use. They help people fall asleep or stay asleep. Non-benzodiazepines, also called “Z” drugs, have fewer reports of dependency, abuse potential, rebound insomnia, and interactions with other medications. Examples of non-benzodiazepines include zolpidem (Ambien), eszopiclone (Lunesta), and zaleplon (Sonata).
  • Benzodiazepines: Doctors prescribe benzodiazepines to treat insomnia or anxiety that is disabling, severe, and causing extreme distress. Diazepam (Valium), alprazolam (Xanax), and triazolam (Halcion) are examples of benzodiazepines. Long-acting benzodiazepines like diazepam may be better for individuals experiencing early wakefulness or those who need help with anxiety throughout their day. However, they have side effects and may cause dependence and rebound symptoms.
  • Antidepressants: Healthcare professionals may also prescribe sedating antidepressants to help a person sleep. Doctors widely prescribe some antidepressants for people with anxiety. Examples include amitriptyline (Elavil), mirtazapine (Remeron), and trazodone (Desyrel).
  • Melatonin-like medications: These medications mimic melatonin, a natural hormone that regulates the body’s sleep-wake cycle and promotes sleep. An example of this is ramelteon (Rozerem).

Learn more about medications for chronic insomnia.

Below are some medications doctors commonly prescribe to treat anxiety and insomnia.

Doxepin (Silenor)

Doxepin (Silenor) is a tricyclic antidepressant (TCA). Doctors use it to treat depression and anxiety, but it can also treat insomnia.

It works by blocking histamine receptors in the brain. This helps a person stay asleep. Unlike other sleep medicines, this drug is not addictive and does not cause dependence.

It is available in capsule and liquid forms. The recommended doxepin dosage for adults is 6 milligrams (mg), taken once daily at least 30 minutes before bedtime. Older people or those with certain medical conditions may begin at 3 mg if a doctor deems it necessary.

Side effects may include increased sleepiness and confusion in older people. It may also lead to increased suicidal thoughts, worsening depression, and behavioral changes.

Learn more about the warning signs of suicide.

Eszopiclone (Lunesta)

Eszopiclone (Lunesta) is a sedative-hypnotic that can help a person fall asleep and wake up less. It works by raising the levels of gamma-aminobutyric acid (GABA) in the brain.

A person typically begins taking 1 mg by mouth once daily before bedtime. A doctor may raise the dose to 3 mg. A person should not take it with or shortly after eating a high fat meal since this may prevent the drug from working well.

Drinking grapefruit juice with this medicine may increase its effect, while drinking alcohol may worsen its side effects.

Ramelteon (Rozerem)

Ramelteon (Rozerem) is a melatonin receptor agonist. Healthcare professionals recommend it for people who have difficulty initiating sleep. It is not habit-forming and shows no potential for abuse, so some doctors prescribe it for long-term use.

Common side effects of Rozerem include:

Zolpidem (Ambien)

Zolpidem (Ambien) is another sedative-hypnotic that can help a person get to sleep and stay asleep longer. Because it is fast-acting, a person must take it immediately before bed, once daily.

Zolpidem comes in tablet, sublingual, and oral spray forms. Like other sleep medications, a person should not take it unless they have at least 7–8 hours to stay in bed.

Estazolam (ProSom)

Estazolam (ProSom) is a benzodiazepine and works by slowing brain activity to induce sleep. Doctors typically use this drug for short-term treatment due to its tendency to cause dependence and addiction.

Benzodiazepines reduce anxiety at lower doses and promote sleep at higher doses. These drugs are addictive, and a person should not take them beyond 3–4 weeks. Abruptly stopping the drug after this amount of time may lead to withdrawal symptoms.

Learn more about benzodiazepine withdrawal.

Benzodiazepines may cause side effects, including:

Zaleplon (Sonata)

Zaleplon (Sonata) is another non-benzodiazepine drug that can help people fall asleep. It works on the GABA receptors in the brain to make a person sleepy and drowsy.

This drug does not help people who wake up too early or several times. Zaleplon (Sonata) is available in 5 and 10 mg oral capsules.

Suvorexant (Belsomra)

Suvorexant (Belsomra) is a newer non-benzodiazepine that works by blocking the action of orexin, a chemical in the brain that keeps a person awake. However, this drug has the potential for abuse and may lead to addiction.

Belsomra is available in 5, 10, 15, and 20 mg. This drug works fast and people should take it within 30 minutes of going to bed.

The most common side effect of suvorexant (Belsomra) is next-day drowsiness. It can also cause temporary muscle weakness of the legs, sleep paralysis, and complex sleep behaviors. Belsomra can also worsen depression and suicidal thoughts.

Lemorexant (Dayvigo) is another sedative-hypnotic that works similarly to Belsomra. This drug is available in 5 and 10 mg tablets that a person should take daily, immediately before bed.

Learn more about Dayvigo here.

Trazodone (Desyrel)

Trazodone (Desyrel) is a type of selective serotonin reuptake inhibitor (SSRI) doctors use to treat depression. However, doctors use it off-label to treat anxiety and insomnia.

It works by restoring the levels of serotonin in the brain. A person can take it with a light snack or meal two or more times a day.

This drug may cause lightheadedness, dizziness, and fainting when a person moves quickly from a lying position (orthostatic hypotension). People should also avoid drinking alcohol and eating grapefruit while taking this drug.

It is essential to follow your healthcare professional’s advice when it is time to stop taking these drugs. While not all of these drugs have withdrawal symptoms, doctors generally recommend slowly decreasing the use of these medications.

Sleeping medications increase or alter how the brain interacts with chemicals like GABA and serotonin. Stopping these medications suddenly may lead to a drop in these chemicals. This sudden change in brain chemistry can lead to withdrawals, including rebound anxiety and rebound insomnia.

A person should also take these medications as prescribed. Most of these prescription medications are for short-term use only. A doctor may increase the dosages for some people if they feel the medications are not working effectively.

Learn more about the symptoms of addiction.

Abruptly discontinuing benzodiazepines can cause severe withdrawal symptoms, such as lead to delirium and seizures.

There are other treatment options besides medication for people with anxiety and insomnia.

Lifestyle changes

Changing certain habits and adopting new ones can help improve anxiety symptoms and insomnia. These include:

Behavior therapies

Below are other non-drug treatments a person with anxiety and insomnia can explore:

Read more on different ways to improve sleep.

Both anxiety and insomnia can significantly affect a person’s quality of life.

Occasional bouts of anxiety and sleeplessness are not a cause of concern. However, if symptoms persist, worsen, or begin to negatively affect a person’s relationships and performance in activities, it may be time to seek help.

A person taking medications for anxiety and insomnia should inform a doctor of any side effects they experience. They should also tell a doctor if the medications seem to have lost their effectiveness or if they plan to take another medication for their insomnia or anxiety.

Learn more about coping with anxiety.

Anxiety and insomnia are common disorders that often trigger or worsen the other. When lifestyle changes and behavior therapies do not work, doctors may prescribe medications for them.

Many medications can address both conditions. These medications alter brain chemistry to help relax a person and induce sleep.

A person should take them as prescribed to prevent adverse reactions. People should never abruptly stop taking their medication or increase their dosage without consulting a doctor, as this may cause severe withdrawal symptoms.

People should inform a doctor if they do not feel any improvement in their symptoms or find their symptoms worsening.