Save big on your prescriptions
with the free SingleCare app.
4.8 average rating

Insomnia Treatments and Medications

Medically reviewed by Karen BergerPharm.D.
Licensed Pharmacist
Updated Jul 14, 2026
Fact Checked

Key takeaways

  • Prescription treatments for insomnia include Z-drugs (such as zolpidem), benzodiazepines, tricyclic antidepressants, orexin receptor antagonists, and melatonin receptor agonists.

  • Over-the-counter medicine for insomnia may include antihistamines such as diphenhydramine or doxylamine, as well as natural supplements like melatonin.

  • Other things that may help insomnia symptoms include cognitive behavioral therapy, sticking to a regular sleep schedule, maintaining a comfortable sleep environment, and winding down before bed. 

Insomnia can be a short-term or chronic condition that is characterized by an inability to fall asleep. Those with insomnia may also experience an inability to stay asleep, or they wake up too early and are unable to fall back asleep. This disruption in sleep patterns can lead to excessive daytime sleepiness, irritability, not feeling well-rested, increased stress, and difficulties with memory, learning, and performing daily tasks. A chronic lack of sleep can often contribute to health problems, such as a weakened immune system, and negative effects on mood, such as depression and anxiety. Continue reading to learn more about insomnia and the different treatment options available, such as lifestyle changes and medications.

How is insomnia diagnosed?

A healthcare provider will look to identify the cause of the insomnia in order to make a diagnosis and recommend treatment options. In some cases, you may be referred to a sleep specialist, psychiatrist, or other specialist. The different causes of insomnia may include stress, chronic pain, certain medical conditions or medications, mental health disorders, and lifestyle factors, such as taking naps late in the afternoon or overconsuming caffeine or alcohol. 

During a diagnosis, a healthcare provider might assess for any risk factors that may be contributing to your insomnia. Risk factors for insomnia can include, but are not limited to, older age, medical conditions like GERD or asthma, medications like decongestants, and a disrupted sleep schedule. 

Different tests and evaluations may be used to confirm a diagnosis of insomnia. A diagnosis may start with a physical exam and an evaluation of your complete medical history. A clinician may recommend a mental health exam to determine whether your emotional well-being may be affecting your ability to sleep. A healthcare provider may also order a blood test to get a full picture of your medical condition. Blood tests can help determine if other health conditions, such as thyroid problems, may be contributing to your insomnia. Other tools that may be used to diagnose primary insomnia include:

Sleep history questionnaire

A clinician will attempt to get a full picture of your sleep history to help confirm a diagnosis of insomnia. They may ask you to keep a sleep diary every day for a couple of weeks that keeps track of different factors like how many naps you take throughout the day, what your exercise habits are like, and what you’re eating or drinking before bed. They may also ask questions like:

  • What time do you usually go to bed, and what time do you wake up? 

  • Do you relax or work before bedtime?

  • Do you have the television on or a bright light turned on while attempting to sleep?

  • Are you able to fall back asleep with ease after waking up in the middle of the night?

  • What have you tried to help you sleep when you’re unable to sleep?

Sleep study 

Also known as polysomnography, a sleep study is not usually recommended unless your healthcare provider suspects you have obstructive sleep apnea or another sleep disorder. This type of study is done in a sleep clinic where you will wear certain sensors to monitor brain waves, heart rate, oxygen levels, and body movements while you sleep. 

Actigraphy

This type of diagnosis tool can be done at home over days or weeks. Your healthcare provider will ask you to wear an actigraph, which is a device that is worn like a watch on your ankle or wrist to monitor different factors while you sleep. 

Insomnia treatment options

Treatment will depend on the severity of insomnia and what may be causing it. Treatment usually starts with non-pharmacological options like lifestyle changes and cognitive behavioral therapy for insomnia (CBT-I). Exercising regularly and improving sleep hygiene habits, like winding down before bed and removing light and noise, can help manage insomnia. Cognitive behavioral therapy for insomnia is provided by a trained psychologist who will help identify anxieties that may be disrupting sleep patterns and replace those anxieties with positive beliefs about sleep. If non-pharmacological options are not enough, drugs to treat insomnia may be recommended.

Types of insomnia medication

Several different medications are approved by the Food and Drug Administration (FDA) to treat insomnia.

Benzodiazepines

Benzodiazepines have sedative effects that can help calm a person and induce sleep. They work by slowing down activity in the brain. Some examples include Halcion (triazolam) and Restoril (temazepam). Benzodiazepines, which are controlled substances, are not typically recommended as first-line agents because of the potential for abuse and dependence. 

Z-drugs

Z-drugs are non-benzodiazepine sedatives that can help slow down activity in the brain and treat insomnia. These drugs include Ambien (zolpidem), Lunesta (eszopiclone), and Sonata (zaleplon). These medications are sometimes used in people with difficulty falling asleep or problems staying asleep. 

Antidepressants

Silenor (doxepin) is a tricyclic antidepressant FDA-approved to treat insomnia, particularly in people who have problems staying asleep. It is believed to work by blocking the histamine H1 receptor involved with wakefulness and sleep. 

Orexin receptor antagonists

Quviviq (daridorexant), Dayvigo (lemborexant), and Belsomra (suvorexant) are FDA-approved for the treatment of insomnia. They are believed to work by blocking the actions of a chemical called orexin that is involved with wakefulness. 

Over-the-counter insomnia medicine or supplements

Over-the-counter antihistamines are typically used to treat allergy symptoms. However, certain antihistamines like Benadryl (diphenhydramine) and Unisom (doxylamine) have sedative effects, and are sometimes used short-term to treat insomnia. Melatonin is a natural hormone that is involved with the sleep-wake cycle, and it can be purchased as an over-the-counter supplement. Over-the-counter medications are usually only recommended for short-term insomnia. Check with a healthcare provider before using any OTC insomnia medicine, even if it is promoted as a natural supplement.

Melatonin receptor agonists

A melatonin receptor agonist, such as Rozerem (ramelteon), may help in certain cases where people have problems falling asleep. It works by acting like melatonin, which naturally helps regulate the sleep-wake cycle.

The best medication for insomnia depends on several factors, such as the severity of the condition, your overall medical history, and any medications you may be taking. Many people may react differently to the same medication. Therefore, it’s important to consult a healthcare provider for the best insomnia medication for you. The following insomnia medication list can give you an idea of what your healthcare provider may recommend.

Save big on your prescriptions
with the free SingleCare app.
4.8 average rating

Best medication for insomnia

Drug nameSee SingleCare price
Ambien
Get free coupon
Lunesta
Get free coupon
Zaleplon
Get free coupon
Belsomra
Get free coupon
DAYVIGO
Get free coupon
Quviviq
Get free coupon
Rozerem
Get free coupon
Silenor
Get free coupon
Restoril
Get free coupon
Banophen
Get free coupon
Melatonin
Get free coupon

This is not an exhaustive list of insomnia medications. Always ask your healthcare provider for the best treatment for insomnia based on your health condition and medical history.

Common side effects of insomnia medicine

The most common side effects of prescription insomnia medications include:

  • Drowsiness during the day

  • Dizziness

  • Headache

  • Constipation

  • Diarrhea

  • Appetite changes

  • Stomach upset

  • Abnormal dreams

  • Fatigue

  • Memory problems

  • Problems with coordination

  • Sleep-related impairment while driving or operating machinery

Prescription sleeping pills can also cause serious side effects. The use of some prescription sleeping pills (notably the Z-drugs) comes with an increased risk of parasomnia, which can lead to dangerous behaviors without any awareness of what is happening. Sleep aids can also increase the risk of falls in older adults. Consult a healthcare provider about other possible side effects, drug interactions, warnings, and precautions before using a medicine for insomnia. 

Home remedies for insomnia

Create a regular sleep schedule

Create a consistent and regular sleep schedule to help synchronize your body’s biological clock. Maintaining a nighttime routine before bed can help you stay on track. That means finishing work and eating dinner well before it’s time for bed. It’s also best to limit or avoid napping throughout the day.

Reduce light and noise

Light can interfere with regular sleep cycles and reduce the amount of time spent asleep. Make sure to turn off devices that can emit blue light, such as TVs and phones. Blue light is known to suppress the secretion of melatonin. Too much noise can also disrupt sleep patterns, so make sure to block out as much noise as possible. 

Ensure your sleeping environment is comfortable 

Make use of a comfortable mattress and pillows. The temperature should not be too hot or too cold, although it is recommended to keep the temperature below room temperature since blankets and coverings can increase body temperature. 

Avoid smoking or drinking too much during the day

Nicotine, alcohol, and caffeine can affect sleep patterns, especially if consumed late in the day. One study found that smoking or drinking within four hours of bedtime can lead to increased sleep fragmentation. 

Relax your mind and body before bedtime

It’s important to wind down at least 30 minutes before bed. You can implement muscle relaxation exercises, gentle breathing, or meditation to help prep the body and mind for deep and restful sleep. 

Expert takeaway 

"Having trouble sleeping can often lead to stress, and stress can make it harder to sleep, which can create a frustrating cycle," says Karen Berger, Pharm.D., member of the SingleCare Medical Review Board. "Making some lifestyle changes and talking to your healthcare provider about treatment options may help you get back to sleeping through the night."

Frequently asked questions about insomnia

What is the main cause of insomnia?

There are many different possible causes of insomnia, including stress, poor sleep habits, and an irregular sleep schedule. Other medical conditions, like restless legs syndrome, and mental health conditions, like depression or anxiety, can also contribute to insomnia. 

What are the types of insomnia?

Experts often refer to two main types of insomnia: short-term insomnia and chronic insomnia. Short-term (acute) insomnia typically lasts for less than three months and is often caused by a stressful event, such as a loved one’s passing. Chronic insomnia is longer-lasting, and is when you have trouble falling or staying asleep at least three nights a week for three months or longer.

Can insomnia be cured?

Depending on the cause, different treatments can be used to help improve insomnia. Lifestyle changes and prescription or over-the-counter sleep aids can help improve sleep quality, sleep maintenance, sleep onset, and sleep time. Cognitive behavioral therapy may also be recommended and include different techniques, such as sleep restriction therapy, stimulus control therapy, and biofeedback. 

Is insomnia a mental illness?

Insomnia is considered a sleep disorder, not a mental illness, according to the American Academy of Sleep Medicine. It may be a symptom of different mental health conditions like anxiety disorders or depression. In some cases, insomnia can also contribute to the development of medical and mental health conditions. 

When should I see a healthcare provider about insomnia?

Good sleep is important for your physical health and well-being. If you’re having trouble sleeping on a consistent basis, you should consult a healthcare provider to determine the underlying cause. A healthcare provider can diagnose an insomnia disorder and recommend the best treatment option for you. 

Sources

Medically reviewed by Karen BergerPharm.D.
Licensed Pharmacist

After receiving her doctorate from the University of Pittsburgh School of Pharmacy, Karen Berger, Pharm.D., has worked in both chain and independent community pharmacies. She currently works at an independent pharmacy in New Jersey. Dr. Berger enjoys helping patients understand medical conditions and medications—both in person as a pharmacist, and online as a medical writer and reviewer.

... 

Subscribe to our savings newsletter

Health education, drug info, wellness & more

By clicking 'Subscribe', I agree to SingleCare's Terms & Conditions.