The cornerstone of therapy for insomnia involves a treatment called cognitive behavioral therapy (CBT). This form of therapy provides techniques to help the body relax and develop habits to improve sleep. It’s performed by a medical professional with specialized training.

Medications are typically used as add-on therapy when general sleep hygiene and CBT do not work. That’s because there are risks that come along with taking any medications, especially in older adults.

Important considerations when considering a sleeping medication include:

  • how long it stays in your body
  • what side effects it may have
  • the level of dependency it may cause

It’s critical to review medications with your physician. Some medications may have secondary side effects, such as daytime sleepiness.

Always take medications as prescribed by your doctor. There should be a timeline and goal for when to start decreasing and stop taking the medication.

I wouldn’t say that I never use medications to treat insomnia. However, I am very conservative and considerate of medication side effects.

Most people typically improve with CBT alone. But some of my patients have persistent insomnia and frequent recurrence. Their condition may require both CBT and medication so they can get adequate sleep at night.

Doctors may recommend several medications to treat insomnia.

Over-the-counter (OTC) medications used for insomnia

  • diphenhydramine (Benadryl)
  • doxylamine (Unisom)

Dietary herbals used for insomnia

  • melatonin
  • valerian root
  • magnesium
  • hops from beer
  • chamomile tea
  • CBD

Prescription medications approved by the Food and Drug Administration (FDA) for insomnia

Prescription insomnia medications fall under several subcategories:

  • non-benzodiazepine agonists
    • eszopiclone (Lunesta)
    • zaleplon (Sonata)
    • zolpidem (Ambien)
  • traditional benzodiazepines
    • estazolam (Prosom)
    • flurazepam (Dalmane)
    • quazepam (Doral)
    • temazepam (Restoril)
    • triazolam (Halcion)
  • antihistamines
    • doxepin (Silenor)
  • melatonin receptor agonists
    • ramelteon (Rozerem)
  • dual orexin receptor agonists (DORAs)
    • lemborexant (Dayvigo)
    • suvorexant (Belsomra)

Prescription medications not approved by the FDA for insomnia

The following medications have a secondary effect of sleepiness and are sometimes prescribed for insomnia:

  • amitriptyline (Elavil)
  • mirtazapine (Remeron)
  • quetiapine (Seroquel)
  • trazodone (Desyrel)

Medications to treat insomnia work in a variety of ways.

OTC medications

OTC medications, such as Unisom and Benadryl, are available without a prescription at any pharmacy. They’re often used to treat insomnia because of their known side effect of causing drowsiness.

Medications such as Tylenol PM or Advil PM may help with sleep, but they contain other ingredients that can be potentially harmful to the body.

Dietary herbals

The most well-known dietary supplement is melatonin, which mimics a hormone that our brain produces in response to darkness. It also helps with the timing of your circadian rhythm with sleep.

Evidence-based data is lacking significantly on whether other herbals used to promote sleep actually work and how much and what route we should take them. Herbal medications can also have harmful consequences to the body.

Prescription medications

  • Traditional benzodiazepines. These activate GABA, a sleep-inducing neurotransmitter. Healthcare professionals do not commonly prescribe them for insomnia because of side effects, habit-forming properties, and the need to taper off.
  • Non-benzodiazepine agonists. These have replaced traditional benzodiazepines because they target a more specific a receptor on GABA for sleep. These medications have fewer habit-forming properties than traditional benzodiazepines, but they still have side effects to consider.
  • Antihistamines. These can help with sleep because they block histamine, which is an alerting neurotransmitter that plays a role in wakefulness. When medications such as Benadryl block histamine, it takes away its stimulation of wakefulness, resulting in drowsiness and sleep.
  • Melatonin receptor agonists. These work by binding to your body’s melatonin receptors in the brain, which play a major role in the signaling pathway for sleep.
  • Dual orexin receptor antagonists (DORAs). These inhibit the effect of orexin, a neurotransmitter in the brain involved in keeping you awake. Blocking it can help you fall asleep more easily.
  • Prescription medications not approved by the FDA. Unapproved prescription medications that are used to treat insomnia include antidepressants, antipsychotics, and mood stabilizers. A healthcare professional may prescribe them because they have a secondary effect of drowsiness or sleepiness.

Many herbal and OTC medications may seem harmless. But when taken over a long period of time or in high volume, they can potentially cause significant organ damage.

Some of these medications may cause drug interactions with other medications you take or foods that you consume. Residual sleepiness, drowsiness, dizziness, and nausea are common symptoms of most OTC medications.

Antihistamines also block the effect of another neurotransmitter known as acetylcholine. Lack of acetylcholine is known to play a role in Alzheimer’s disease. Chronic Benadryl use may be associated with dementia.

Taking any of these medications with alcohol can be very dangerous.

Finding a quick fix with medications is not often the first choice when it comes to treating insomnia.

Almost everyone has trouble sleeping at some point in their life. Stress, for example, can keep you from sleeping well at times. This can last for days or weeks. It often gets better in less than a month without any treatment.

However, there are times when difficulty sleeping can turn into a long-term problem, especially when you continue to worry about not sleeping well. These are typically the patients that I see in my practice.

Chronic insomnia is characterized by difficulty with sleep 3 times per week for more than 3 months. It can affect a person’s quality of life significantly.

I consider using prescription medications when a patient has a long-term, recurring sleep issue that is significantly affecting their quality of life and cannot be managed with CBT alone.

Insomnia is often associated with another health condition, such as depression or chronic pain. When these conditions occur together, it is very important to treat the insomnia and the underlying disorder with medications such as antidepressants or analgesics if necessary.

After addressing any underlying medical conditions, I typically look to one of the FDA-approved medications to treat the insomnia. Medication choice is based upon complaints of sleep onset, sleep maintenance, or early morning awakenings.

Non-benzodiazepine agonists are probably the most commonly used as first-line prescription medications.

No medication should be intended to be used forever. You should always have regular follow-ups with your physician, with a goal endpoint to reevaluate the need for medication.

However, some people may require lifelong therapy and treatment to achieve healthy, consistent sleep.

No one with a diagnosis of insomnia needs to experience a lower quality of life. But when it comes to prescription medications, it’s always important to weight benefits versus risks.

Almost all prescription medications can cause mild side effects, such as:

  • drowsiness
  • nausea
  • dizziness
  • fatigue
  • headache

All benzodiazepines can be habit forming. They have amnesic (memory loss) and hypnotic properties.

Prescription medications that are not FDA-approved for insomnia may have higher risks, because they’re used for other psychiatric and behavioral concerns. They may themselves cause issues such as:

  • altered behavior
  • atypical sleep patterns
  • hallucinations

No medication is 100 percent safe. All medications should be prescribed by a licensed physician who is familiar with their dosing and side effects.

Typically, medications that have a shorter duration of action (or stay in your body for a shorter amount of time) are preferred but tend to be more habit forming.

The hardest type of insomnia to treat is early morning awakenings. This requires medications with a long half-life, so it remains in the body all night.

The problem with long-acting medications is that they may cause “sleep drunkenness” or sleep inertia the following day.

A new type of prescription medication referred to as DORAs are being studied in the older adults with dementia. I typically prefer medications that are less addictive and have limited side effects.

Sleep medications can be habit forming, especially benzodiazepines, which I try to avoid prescribing unless it’s absolutely necessary.

With any medication, less is always preferred. You must always watch for side effects.

It may be hard to come off of medication once it starts to work. That’s why it’s important to regularly follow up with your doctor to have a strategic game plan to help you sleep well at night in a healthy way.

Gradually weaning off insomnia medication is almost always preferred. Some medications may have rebound side effects, including insomnia and even seizures.

With proper motivation and guidance, most people are capable of managing their insomnia with minimal medication support.

Always consider the current medications that you are taking for any drug interactions. Look at the individual ingredients and make sure you have no allergies to contents of the medication.

Any medications that can make you drowsy should typically not be taken when drinking or driving and should be avoided by older adults.

  • Avoid alcohol.
  • Follow prescriptions.
  • Follow up with your doctor regularly.
  • Have an endpoint for medications.
  • Exercise.
  • Eat a balanced diet.

Raj Dasgupta MD, FACP, FCCP, FAASM, is a pulmonary, critical care, and sleep medicine specialist and a medical advisor for Healthline. He practices at the University of Southern California, where he is an associate professor of clinical medicine, assistant program director of the Internal Medicine Residency Program, and the associate program director of the Sleep Medicine Fellowship. Dr. Dasgupta is an active clinical researcher and has been teaching around the world for more than 18 years.