Sleep Medication: Prescription Options Compared

🕐 8 min read 📅 Updated July 2026
Quick Answer

There is no single best sleep medication. Prescription options like trazodone (25-100 mg) or low-dose doxepin (3-6 mg) target specific problems, while over-the-counter choices like melatonin (0.5-3 mg) and magnesium (200-400 mg) work differently. CBT-I remains the first-line treatment for chronic insomnia.

Choosing the right sleep medication starts with one question: are you struggling to fall asleep, or to stay asleep? That distinction, more than brand names or marketing, determines which prescription or over-the-counter option is actually a fit. It also matters that medication is not automatically the first step — cognitive behavioral therapy for insomnia (CBT-I) produces better long-term remission than sleep medication alone, with no dependency or rebound insomnia risk, which is why it is the recommended first-line treatment for chronic insomnia. For more on that non-drug approach, see insomnia and how to sleep better.

Best Prescription Sleep Medication

There is no universal "best" prescription sleep medication because doctors match the drug to the specific sleep complaint. Trazodone, an antidepressant used off-label for sleep, is the most commonly prescribed insomnia medication in the United States. The typical sleep dose is 25-100 mg at night, and most people start at 25-50 mg.

For people who fall asleep fine but wake up in the early morning hours, low-dose doxepin (3-6 mg) is often preferred. It is a selective H1 (histamine) antagonist at this low dose and is generally considered a first-line option for sleep maintenance in older adults, since it improves the ability to stay asleep through the last third of the night.

Sleeping Medication Names

Common Sleep Medications

Grouped by category, the common sleep medications people ask about are: prescription drugs used for insomnia (trazodone, low-dose doxepin), over-the-counter supplements (melatonin, magnesium, ashwagandha, L-theanine), and the non-drug gold standard, CBT-I. CBT-I outperforms medication for long-term remission from chronic insomnia, with an odds ratio of roughly 1.82 for remission at one year compared to medication alone, and without the dependency risk that comes with ongoing drug use.


Over-the-Counter Sleep Medicine

Melatonin is the most recognizable over-the-counter sleep aid, but it is a chronobiotic — a timing hormone — rather than a direct sedative. The typical starting dose is 0.5-1 mg, with a common effective range of 1-3 mg taken about 30 minutes before bed. Doses above 5 mg are not shown to work better, and 10 mg is considered the practical ceiling. Melatonin works best for jet lag or a shifted body clock and has more limited benefit for primary insomnia.

Magnesium is the other well-studied option, generally used at 200-400 mg of elemental magnesium about 30-60 minutes before bed. In a randomized controlled trial, magnesium bisglycinate specifically reduced time to fall asleep by about 17.8 minutes and increased deep sleep by about 19.3%. Read more in magnesium for sleep.

Antihistamine-based sleep aids are also sold over the counter as a broad category, though a pharmacist is the best resource for comparing specific products and how they may interact with other medications you take.


Medicine to Help You Sleep

Beyond the prescription and over-the-counter categories, several supplements are used specifically as medicine to help you sleep. Ashwagandha (KSM-66 extract) at 600 mg or more per day shows moderate evidence for improving how quickly people fall asleep and overall sleep efficiency, though long-term data beyond 12 weeks is still limited. L-theanine, well tolerated at doses up to 450 mg per day, tends to improve how rested people feel subjectively, with smaller effects on objectively measured sleep.

Best Medicine for Sleep

The best medicine for sleep depends entirely on the problem being solved. For circadian issues like jet lag, melatonin is the better-matched tool. For difficulty staying asleep, low-dose doxepin or magnesium may be more appropriate. For chronic insomnia lasting months, CBT-I is the treatment with the strongest long-term evidence. There is no single supplement or drug that works best for everyone.

Children's Sleep Medication

Sleep need itself varies dramatically by age — from 14-17 hours for newborns down to 8-10 hours for teenagers — which is one reason medication guidance built for adults does not automatically transfer to children. Dosing information for melatonin and other sleep aids above is based on adult data, so any medication or supplement for a child's sleep, including melatonin gummies, should be discussed with a pediatrician first. Sleep organizations generally recommend addressing sleep habits and routines — see how to sleep better — before considering medication for a child.


New Sleep Medications

A growing area of sleep medicine research targets the brain's orexin (hypocretin) system, a signaling pathway from the lateral hypothalamus that stabilizes the transitions between sleep and wakefulness. A deficiency in this system is what causes narcolepsy type 1, which is part of why orexin signaling has become a focus for newer medication development. Because treatment options and approvals in this area change over time, ask your doctor or pharmacist which newer sleep medications are currently considered appropriate for your specific situation.


Sleep Medicine Near Me

The most reliable way to find the right sleep medicine near you is to start with your primary care doctor or a local pharmacist, who can review your symptoms and medical history before recommending an over-the-counter option or a prescription. If your main issue is loud snoring, gasping for air, or heavy daytime sleepiness, ask about a referral to a sleep specialist rather than starting with medication — those symptoms point toward sleep apnea, which medication does not treat. Read more in CPAP machines for sleep apnea. If the problem is ongoing insomnia, three or more nights a week for three months or longer, ask specifically about CBT-I, covered in more depth at insomnia.

Prescription vs. Over-the-Counter Sleep Medicine
Feature
💊 Prescription
🌿 OTC / Supplement
Typical example
Trazodone (off-label), low-dose doxepin
Melatonin, magnesium, ashwagandha, L-theanine
Common dose
Trazodone 25-100 mg; doxepin 3-6 mg
Melatonin 0.5-3 mg; magnesium 200-400 mg
Best matched for
Staying asleep through the night
Circadian shifts (melatonin); sleep onset (magnesium)
vs. CBT-I
CBT-I shows better long-term remission (OR ≈ 1.82 at 1 year)
CBT-I has no dependency or rebound risk
Doses and comparisons reflect the sources cited below; always confirm any medication or supplement plan with a doctor or pharmacist.
When to See a Doctor

Talk to a doctor before starting or combining any sleep medication, and seek medical advice if:

A doctor or pharmacist can confirm the right option and dose for your specific situation.


Frequently Asked Questions

What is the best prescription sleep medication?
There is no single best prescription sleep medication because the right choice depends on whether you struggle to fall asleep or stay asleep. Trazodone, an antidepressant used off-label, is the most commonly prescribed insomnia medication in the United States, typically dosed at 25-100 mg at night. Low-dose doxepin (3-6 mg) is often preferred for staying asleep through the last third of the night, especially in older adults. A doctor can match the medication to your specific sleep problem.
What is the best over-the-counter sleep medicine?
Melatonin and magnesium are the most studied over-the-counter options. Melatonin is typically taken at 0.5-3 mg about 30 minutes before bed, since higher doses above 5 mg are not shown to work better. Magnesium, especially magnesium bisglycinate, is used at 200-400 mg roughly 30-60 minutes before bed and has been shown in a randomized trial to shorten sleep onset by about 17.8 minutes and increase deep sleep by about 19.3%.
What medicine helps you sleep without a prescription?
Non-prescription options that help you sleep include melatonin, magnesium, ashwagandha (KSM-66 extract at 600 mg or more per day), and L-theanine (well tolerated up to 450 mg per day). These have varying levels of evidence: magnesium and ashwagandha show measurable effects on sleep onset and quality in studies, while L-theanine mainly improves how rested people feel rather than objective sleep measures. Cognitive behavioral therapy for insomnia (CBT-I) is a non-drug approach considered the first-line treatment for chronic insomnia.
Are there new sleep medications available?
Sleep medicine research increasingly focuses on the orexin (hypocretin) system, a brain pathway from the lateral hypothalamus that stabilizes transitions between sleep and wakefulness; a deficiency in this system causes narcolepsy type 1. This pathway is a newer target for medication development, but treatment options and approvals change over time, so ask your doctor or pharmacist which newer medications are currently appropriate for your situation.
How do I find sleep medicine near me?
Start with your primary care doctor or a pharmacist, who can review your symptoms and recommend an appropriate over-the-counter or prescription option. If you have loud snoring, gasping for air, or daytime sleepiness, ask about a referral to a sleep specialist or accredited sleep center to rule out sleep apnea, since medication alone will not treat an underlying breathing disorder. If insomnia has lasted three or more nights a week for three months or longer, ask specifically about CBT-I.
What are the most common sleep medications?
Commonly used options include the prescription drugs trazodone (off-label) and low-dose doxepin, and the over-the-counter or supplement options melatonin, magnesium, ashwagandha, and L-theanine. Cognitive behavioral therapy for insomnia (CBT-I) is not a medication but is the recommended first-line treatment for chronic insomnia because it produces better long-term remission than medication alone, without the dependency or rebound insomnia risk.
Is melatonin safe for children's sleep?
Melatonin dosing guidance from sleep organizations is based on adult data, not children, so any medication or supplement for a child's sleep, including melatonin gummies, should be discussed with a pediatrician first. Children need considerably more total sleep than adults depending on age, and sleep organizations generally recommend addressing sleep habits and routines before considering any medication for a child.
What are common sleeping medication names?
Names you may hear discussed for sleep include the prescription medications trazodone and low-dose doxepin, and the supplements melatonin, magnesium (particularly magnesium bisglycinate), ashwagandha (KSM-66), and L-theanine. Each works differently: trazodone and doxepin are prescription medications repurposed or dosed specifically for sleep, while melatonin, magnesium, and the other supplements are available without a prescription.

Sources