Sleeping Pills

pexels cottonbro studio 6865183

If you’re struggling to fall asleep every night, you might have already tried a long list of sleep-inducing tricks, like sipping on warm milk or running through a few breathing exercises—all with no real results. Now you’re exhausted and ready for a better solution, and likely wondering if there’s a simple pill that can solve all your nighttime restlessness. An over-the-counter or prescription sleeping pill could help, but there’s a lot you should know as you consider your options. Read on for our guide to the different types of sleeping pills and the potential pros, cons, and side effects of each.

Note: The content on Sleepopolis is meant to be informative in nature, but it shouldn’t be taken as medical advice, and it shouldn’t take the place of medical advice and supervision from a trained professional. If you feel your child may be suffering from any sleep disorder or medical condition, please see your healthcare provider immediately.

Long Story Short

  • The term “sleeping pills” includes a number of natural, over-the-counter, and prescription medications that are designed to help you fall asleep and stay asleep all night.
  • Many people find sleeping pills work for them; however, depending on the type, they may function best with short-term use. Other types may be safely taken for longer periods.
  • Sleeping pills may not be safe for children or pregnant people, and it’s always a good idea to check with your healthcare provider before starting any new medication or supplement.

What Are Sleeping Pills?

“Sleeping pills” is a broad term for a wide variety of medications and natural supplements designed to help you get better sleep. Whether an over-the-counter option from a local pharmacy or prescribed by a healthcare provider, all sleeping pills promise solid and sound slumber.

How Sleeping Pills Work

Different types of sleeping pills work in different ways to get you better rest. Many over-the-counter options use antihistamines, the main ingredient in allergy-treating medications like Benadryl, to help you feel drowsy. Another popular non-prescription option, melatonin, gives you a boost of the hormone that tells your body it’s time for bed.

Prescription sleeping pills and prescription medications that have a sedative effect don’t all work the same, either. Some plug into receptors in the brain, slow down your brain activity, and relax your muscles. (1) (2) Others block histamines like over-the-counter options but with much more potency. (3)

Are Sleeping Pills Effective?

The short answer is yes, sleeping pills work. The long answer starts with, “Well, that depends.” It depends on the person, type of medication, type of sleeping issue, and how long you take it. (4) One sleeping pill might work for your friend but might not have the same effect on you.

While sleeping pills may help many fall asleep and stay asleep short- and long-term, some studies have found they have little to no effect on improving sleep onset and duration. (5) One study review, for example, found that two main types of prescription sleeping pills (benzodiazepines and non-benzodiazepines) showed very little improvement in older adults with insomnia, but caused quite a few side effects. (5) This study review also noted these medications worked best as short-term options, which we’ll discuss soon. Your healthcare provider can help you decide if a sleeping pill is a good idea and sort out which options might be your best bet.

Short-Term Use

Quite a few sleeping pills work well for helping you both fall asleep and sleep all night when used over a short time. One study review from 2022 found that these medications worked best for better sleep in the short term: (6)

  • Benzodiazepines (like Valium)
  • Doxylamine (Unisom)
  • Eszopiclone (Lunesta)
  • Lemborexant (Dayvigo)
  • Seltorexant (under development) (7)
  • Zolpidem (Ambien)

While benzodiazepines may induce sleep, the side effects and addictive properties of these medications have prompted most providers to avoid them. (8) We’ll dive deeper into that in a bit.

Long-Term Use

The same 2022 study review found that with long-term treatment, which was defined as at least three months, Lunesta and Dayvigo were the most effective for both sleep onset and duration. Ambien worked well for sleep, but the study found a lot of participants dropped out due to unspecified side effects.

Overall, at least according to this large review, Lunesta emerged as a winner for both the short-term and long-term camps. (6) Other studies confirm it’s best to keep sleeping pills as a short-term solution. (5) (9) However, if you’re considering taking sleep medication, it’s best to check with your healthcare provider, who can look at your history, sleeping symptoms, and overall health to help you pick the best sleep aid for you.

Who Should Use Sleeping Pills?

We all need sleep. While you snooze, your body builds brain cells, heals tissues, creates blood cells, and gives important systems and organs like your heart some time to rest. (10) Cognitive behavioral therapy for insomnia (CBT-I) and other therapies help many battle sleepless nights. (11) But if you’ve tried everything you can think of and still can’t get your zzzs in, your healthcare provider might recommend you try a sleeping pill.

“Prescription sleeping pills are generally for adults who have tried lifestyle modifications and non-prescription sleep aids without success,” says Dr. Chester Wu, MD, a sleep medicine physician in Houston, TX. He adds that natural alternatives might work for people looking for a milder option, and OTC sleeping pills are typically for temporary use and aren’t recommended for chronic sleep disorders.

Who Should Avoid Sleeping Pills?

All medications have possible side effects, and sleeping pills are no exception. Some experts claim several types of sleeping pills may be connected with chronic kidney disease and even renal failure, so those with health issues in that area should use extra caution. (12)

Some sleep medications are known to cause odd and sometimes dangerous behavior while you sleep, like sleepwalking and sleep-driving. (13) Many sleeping pills can increase the risk of falling, especially if you’re in the older adult category. (4) If you experience symptoms like these, you may need to avoid certain sleeping pills.

This is where a healthcare provider can help you in spades. They understand the risks and benefits of each type of sleeping pill and can use that information along with your health history and other factors to help you find a sleeping pill with the least risk.

Over-the-Counter Sleeping Pills

If you’ve had the occasional stretch of sleepless nights, you may have perused the impressive selection of sleeping pills at your local pharmacy or general store. “The majority of OTC sleep aids contain antihistamines, which cause drowsiness, helping individuals fall asleep faster,” Wu says. (14) Sleeping pills you can buy over the counter typically contain one of two antihistamines: diphenhydramine or doxylamine.


This antihistamine is the main ingredient for Benadryl but is also included in several popular sleep aids like Advil PM and Aleve PM. (15) Diphenhydramine works by blocking histamine receptors all over your body, which is why it can be used for so many different symptoms, like allergies. Histamine is a chemical released by your immune system that can get your brain firing and plays a part in your sleep-wake cycle, so when antihistamines stop it in its tracks, you get drowsy. (16) (17)


This ingredient is newer on the scene and used in sleep medicines like Unisom SleepTabs. (18) Doxylamine also binds to histamine receptors, which can make you sleepy in a snap. It’s also commonly used to decrease nausea and vomiting in pregnant people. (18)

Though effective in a pinch, these meds won’t help you over the long haul. “[OTC sleep aids] can lead to a hangover effect and are not suitable for long-term use,” Wu says. Even though they aren’t addictive, your body can get used to them fast, causing them to be less and less effective the more you take them. (14)

Prescription Sleeping Pills

If your trusty OTCs aren’t cutting it, or you find you need longer-term help, your healthcare provider might suggest trying a prescription sleeping pill. “[Benzodiazepines, barbiturates, and nonbenzodiazepines] act on the central nervous system,” says Wu. “Benzodiazepines and barbiturates enhance the effect of the neurotransmitter GABA, promoting sedation.” (3)

Neurotransmitters are kind of like microscopic messengers in your brain, and GABA has a big say in how excited your brain gets. (19) By affecting different GABA receptors in the body, when these sleeping pills get into your system, they relax your muscles and draw you into slumber. (3)


Benzodiazepines—or “benzos”—got very popular in the 1970s, and are still often prescribed not just for sleep but for anxiety. Valium, Xanax, and Ativan fall into this category, but other benzodiazepines have been developed and marketed for sleep specifically: (3) (20)

  • Triazolam (Halcion)
  • Temazepam (Restoril)
  • Estazolam (ProSom)
  • Flurazepam (Dalmane)

These medications can get you sleepy quick, but experts have found they come with some risks, such as the potential for abuse and addiction. (8) Some studies go so far as to suggest high doses of benzodiazepines can permanently damage some brain processes. (9) Benzodiazepines can also affect the quality of your sleep by altering your sleep architecture: the way you move in and out of sleep stages. (21)


This class of sleeping pill is used to treat everything from headaches to seizures. The specific barbiturate for sleep is called amobarbital, and it affects GABA neurotransmitters in your brain, which has the effect of chilling you out and making you sleepy. (22)

This type of sleeping pill is prescribed less often than others. Amobarbital is not approved by the FDA as a sleep aid, and the American Association of Sleep Medicine also doesn’t add its stamp of approval. (22) (23)


Also known as Z-drugs, non-benzodiazepines work on a few subtypes of GABA receptors. They generally help you sleep just as well if not better than benzodiazepines, and come with fewer side effects. (3) They get to work quickly but don’t stay in your system as long as benzos, so you’re less likely to have a sleeping pill hangover the next morning. (3)

You may recognize some of these non-benzodiazepine sleeping pills: (3)

  • Zolpidem (Ambien)
  • Eszopiclone (Lunesta)
  • Zaleplon (Sonata)

These medications can come in short-acting form or controlled release if you deal with nighttime waking. They get to work fast and can help you fall asleep and stay asleep. (3)

Other Classes of Sleeping Pills

While the sleeping pills above get a lot of attention, there are some lesser-known options out there that can help your sleep, too. (3)

  • Histamine-1 receptor antagonists: Think of this one as “super-Benadryl.” These pills hit your histamine receptors hard and get you to sleep fast, but they can also cause hangovers and headaches. Example: Doxepin (Silenor)
  • Melatonin receptor agonists: These prescription medications act like melatonin, a natural hormone, but are much stronger than any over-the-counter supplements you may find. (24) Examples: Ramelteon (Rozerem) and Tasimelteon
  • Dual-orexin receptor antagonists (DORAs): This group targets other receptors in the body that have a lot to do with wakefulness. Example: Suvorexant (Belsomra)

Side Effects of Prescription Sleeping Pills

With so many different types of pills available for sleep, potential side effects are all over the map. While headaches, for example, can be a common side effect for almost every sleeping pill, Z-drugs like Ambien tend to cause dry mouth and parasomnias like sleepwalking more than other types. Antihistamines and benzodiazepines cause more drowsiness the next day. (1) (25) (26) (27)

Benzodiazepines can also cause nausea, vomiting, and diarrhea, while Z-drugs are more likely to cause constipation. (1) Non-benzodiazepines have become a little notorious for causing odd and sometimes dangerous behavior while sleeping. (13)

The Food and Drug Administration released a warning in 2019 that states Lunesta, Sonata, and Ambien have been known to cause not just sleepwalking, but also driving, going outside, cooking, falling into water, and other dangerous sleep behaviors. These sleeping pills can make you unsteady on your feet and have been linked to falls in older adults. (5) (13)

Your provider can help you figure out if you might be at a higher risk for side effects, but it may be a good idea to have someone with you the first time you take one of these medications.

Sleeping Pill Dependence and Addiction

Now let’s talk about a few side effects that demand some extra attention: dependence and addiction. Many people avoid sleeping pills because they worry that once they start, they won’t ever be able to fall asleep again without them. That concern is valid, but the risk can be lowered based on the type of sleeping pill you use.

“Benzodiazepines and barbiturates have a high risk of dependence and abuse, [and] are typically prescribed for short-term use,” Wu explains. “Nonbenzodiazepines have a lower risk but can still lead to dependence if used long-term.”

One study review looked at research from a twenty-year period and found that some sleeping pills have shown safety and effectiveness long-term. These included: (5)

  • Non-benzodiazepines
  • Antihistamines
  • Melatonin agonists
  • DORAs

When it comes to over-the-counter options, addiction isn’t an issue, but dependence can be. “OTC sleep aids generally have a lower risk of addiction compared to prescription medications, but long-term use can lead to tolerance and dependence, so caution is necessary,” Wu says. (4) (14)

Are Sleeping Pills Safe During Pregnancy?

When you’re pregnant, you might get kicked awake by that growing bundle of joy all night long. Whether they go after your bladder or your ribs, the effect is the same: subpar sleep. Your first instinct may be to grab your normal sleep aid, but it’s a good idea to hold off until you can talk to your healthcare provider.

“Prescription sleeping pills, particularly benzodiazepines and barbiturates, are usually avoided in pregnancy as they may pose risks to the developing fetus, and any medication during pregnancy should be discussed with a healthcare provider,” says Wu. Even an over-the-counter sleep aid should be used only after getting the green light from your provider, he adds. (4)

Are Sleeping Pills Safe for Children?

Most kids go through bedtime-fighting phases, but sometimes they truly have a problem falling or staying asleep. When your kid doesn’t sleep, nobody sleeps, and that can only go on for so long before someone starts screaming into a pillow. So what’s a parent to do?

The best first step is to talk to your child’s healthcare provider, who can point you to safe options. “OTC sleeping aids are not generally recommended for children, and parents should consult a pediatrician for persistent sleep issues to explore safer and more appropriate interventions,” Wu says, and adds that natural alternatives should be used with caution and as directed by your provider.

If you and your child have tried everything else, or your child has a diagnosed sleep disorder, their provider may want to try a prescription sleep aid for a short time, says Wu.

Other Sleep Aids

If you abhor the idea of putting chemicals into your body to get your beauty rest, then you may be tempted by one of the many natural sleep aids on the market. Most supplements haven’t been well-studied, and the FDA doesn’t regulate them the same way they do medications, so they should always be taken with the proverbial grain of salt and a spoonful of caution. (28)


Your body produces melatonin naturally and this hormone is closely related to your circadian rhythm, or internal clock. “Melatonin supplements can help adjust the body’s internal clock and are often used for jet lag,” says Wu. While melatonin doesn’t necessarily knock you out, it encourages your body and brain to realize it’s time for sleep. (29)

Other Natural Alternatives

A well-meaning family member might swear by various home remedies for better sleep, and many of these don’t hurt to try. “Herbal supplements like valerian root are believed to induce relaxation and sleep, but the scientific evidence is limited,” Wu says. Here are some of the more popular natural sleep aids: (30) (31)

Recently, magnesium has stepped into the sleep aid spotlight. “There is some evidence to suggest that magnesium supplementation can improve sleep quality, especially for those who have a magnesium deficiency,” Wu says. “It plays a role in maintaining healthy levels of neurotransmitters and can have a calming effect on the brain and body, promoting muscle relaxation and stress reduction.” (33)

Sleeping Better Without A Sleep Aid

Some sleep disorders like insomnia only respond to medication, but for others, good sleep hygiene can get your slumber back on track. You can try out these sleep hygiene tips anytime: (3)

  • Avoid big meals right before bed
  • Forgo alcohol and caffeine a few hours prior to when you want to sleep
  • Get some exercise during the day
  • Keep your room comfy, cool, and dark
  • Limit your daytime naps, especially in the afternoons
  • Put away the screens as bedtime gets close

When to Talk to Your Doctor About Sleep Aids

Sleeping pills can help you get the rest you need, but it’s important to identify what’s causing your sleep troubles before you start one. “It’s crucial that individuals consult with their physician if they have persistent sleep problems before starting any new medication or supplement, especially for pregnant individuals, children, or those with preexisting medical conditions,” Wu says. “Trying to self-medicate persistent insomnia or other sleep disorders can lead to missed underlying health issues that require medical attention and management.”

The Last Word From Sleepopolis

If a lack of sleep is making your life difficult, it’s only natural to explore solutions. Sleeping pills might be the answer for you, but it’s important to approach the problem as a team with your healthcare provider. You know your health history and how you feel, and your provider knows which sleeping aids work best for different health needs. Working together, you can make a plan that will get you back to dreamland.


How long does it take sleeping pills to kick in?

The time it takes for sleeping pills to kick in is different for every medication, but the American Academy of Sleep Medicine recommends taking your sleeping pill seven to eight hours before you want to wake up in the morning. (34)

How long do sleeping pills make you sleep?

How long your sleeping pill lasts depends on the type and the specific medication. Halcion and Zaleplon, for example, may pass through your system more quickly, while Ambien CR and Lunesta may stick around a while longer. Lunesta has a half-life of six to nine hours, which means after that time, half of the dose you took will be out of your system, and its effects will start to taper off. (3)

What happens if you take sleeping pills every day?

When you take sleeping pills every day, your body may get used to them and develop a dependence—which means the longer you take it, the less it works. “Benzodiazepines and barbiturates have a high risk of dependence and abuse, [and] are typically prescribed for short-term use,” Wu explains. “Nonbenzodiazepines have a lower risk but can still lead to dependence if used long-term.” (5)


  1. Benzodiazepines – StatPearls – NCBI Bookshelf. Accessed October 8, 2024.
  2. Zolpidem – StatPearls – NCBI Bookshelf. Accessed October 8, 2024.
  3. Sleep Medicine: Insomnia and Sleep – PMC. Accessed October 10, 2024.
  4. Sleep Medications for Sleep Disorders – Sleep Education by AASM. Accessed October 8, 2024.
  5. Zee PC, Bertisch SM, Morin CM, et al. Long-Term Use of Insomnia Medications: An Appraisal of the Current Clinical and Scientific Evidence. JCM. 2024;12(4):1629. doi:10.3390/jcm12041629
  6. De Crescenzo F, D’Alò GL, Ostinelli EG, et al. Comparative effects of pharmacological interventions for the acute and long-term management of insomnia disorder in adults: a systematic review and network meta-analysis. The Lancet. 2022;400(10347):170-184. doi:10.1016/S0140-6736(22)00878-9
  7. Study Details | A Study of Seltorexant as Adjunctive Therapy to Antidepressants in Adult and Elderly Participants With Major Depressive Disorder With Insomnia Symptoms Who Have Responded Inadequately to Antidepressant Therapy | Accessed October 8, 2024.
  8. Benzodiazepine Addiction: Symptoms & Signs of Dependence. Accessed October 10, 2024.
  9. DeKosky ST, Williamson JB. The Long and the Short of Benzodiazepines and Sleep Medications: Short-Term Benefits, Long-Term Harms? Neurotherapeutics. 2020;17(1):153-155. doi:10.1007/s13311-019-00827-z
  10. How Sleep Works – Why Is Sleep Important? | NHLBI, NIH. Accessed September 14, 2024.
  11. Muench A, Vargas I, Grandner MA, et al. We know CBT-I works, now what? Fac Rev. 2022;11. doi:10.12703/r/11-4
  12. Liao CY, Chung CH, Lu KC, et al. Taking Sleeping Pills and the Risk of Chronic Kidney Disease: A Nationwide Population-Based Retrospective Cohort Study. Front Pharmacol. 2021;11:524113. doi:10.3389/fphar.2020.524113
  13. FDA adds Boxed Warning for risk of serious injuries caused by sleepwalking with certain prescription insomnia medicines | FDA. Accessed October 8, 2024.
  14. Medicines for sleep: MedlinePlus Medical Encyclopedia. Accessed October 8, 2024.
  15. Diphenhydramine: MedlinePlus Drug Information. Accessed October 8, 2024.
  16. Lucaci D, Yu X, Chadderton P, Wisden W, Brickley SG. Histamine Release in the Prefrontal Cortex Excites Fast-Spiking Interneurons while GABA Released from the Same Axons Inhibits Pyramidal Cells. J Neurosci. 2024;43(2):187-198. doi:10.1523/JNEUROSCI.0936-22.2022
  17. Diphenhydramine – StatPearls – NCBI Bookshelf. Accessed October 8, 2024.
  18. Doxylamine – StatPearls – NCBI Bookshelf. Accessed October 8, 2024.
  19. GABA Receptor – StatPearls – NCBI Bookshelf. Accessed October 10, 2024.
  20. Benzodiazepines. Accessed October 10, 2024.
  21. De Mendonça FMR, De Mendonça GPRR, Souza LC, et al. Benzodiazepines and Sleep Architecture: A Systematic Review. CNSNDDT. 2024;22(2):172-179. doi:10.2174/1871527320666210618103344
  22. Barbiturates – StatPearls – NCBI Bookshelf. Accessed October 10, 2024.
  23. DailyMed – AMYTAL SODIUM- amobarbital sodium injection, powder, lyophilized, for solution. Accessed October 10, 2024.
  24. Kim HK, Yang KI. Melatonin and melatonergic drugs in sleep disorders. Transl Clin Pharmacol. 2022;30(4):163. doi:10.12793/tcp.2022.30.e21
  25. Zolpidem: MedlinePlus Drug Information. Accessed October 10, 2024.
  26. Alhwimani AK, Aljohani RA, Altulaihi BA. The Use of Over-the-Counter Sleep Aid Containing Diphenhydramine Hydrochloride Among Saudis. Cureus. Published online December 22, 2021. doi:10.7759/cureus.20622
  27. Eszopiclone: MedlinePlus Drug Information. Accessed October 10, 2024.
  28. Facts about Dietary Supplements | FDA. Accessed October 10, 2024.
  29. Melatonin: What You Need To Know | NCCIH. Accessed October 10, 2024.
  30. Guadagna S, Barattini DF, Rosu S, Ferini-Strambi L. Plant Extracts for Sleep Disturbances: A Systematic Review. Evidence-Based Complementary and Alternative Medicine. 2020;2020:1-9. doi:10.1155/2020/3792390
  31. Hu Z, Oh S, Ha TW, Hong JT, Oh KW. Sleep-Aids Derived from Natural Products. Biomolecules & Therapeutics. 2018;26(4):343-349. doi:10.4062/biomolther.2018.099
  32. Shannon S, Lewis N, Lee H, Hughes S. Cannabidiol in Anxiety and Sleep: A Large Case Series. TPJ. 2019;23(1):18-041. doi:10.7812/TPP/18-041
  33. Arab A, Rafie N, Amani R, Shirani F. The Role of Magnesium in Sleep Health: a Systematic Review of Available Literature. Biol Trace Elem Res. 2024;201(1):121-128. doi:10.1007/s12011-022-03162-1
  34. When to take a sleeping pill for insomnia – Sleep Education. Accessed October 10, 2024.
  35. Wu, Chester, MD. Personal interview. October 3, 2024.
Abby McCoy

Abby McCoy

Abby McCoy is an RN of 16 years who has worked with adults and pediatric patients encompassing trauma, orthopedics, home care, transplant, and case management. She has practiced nursing all over the world from San Fransisco, CA to Tharaka, Kenya. Abby loves spending time with her husband, four kids, and their cat named Cat.

Leave a Comment