How to Get Sleeping Pills: OTC and Prescription Options

Getting sleeping pills depends on what type you need. Over-the-counter sleep aids are available at any pharmacy without a prescription, while stronger prescription medications require a medical evaluation, either in person or through telehealth. The path you take depends on how severe your sleep problems are and how long they’ve lasted.

Over-the-Counter Sleep Aids

If you want something tonight without seeing a doctor, two antihistamines are sold as sleep aids in virtually every drugstore and grocery pharmacy. Diphenhydramine (the active ingredient in Benadryl and ZzzQuil) and doxylamine (sold as Unisom SleepTabs) both cause drowsiness as their primary effect. They’re inexpensive and widely available.

The tradeoff is that they come with real downsides. Both can leave you groggy the next morning, cause dry mouth, constipation, and difficulty urinating. Your body builds tolerance to them quickly, so they tend to lose effectiveness within a few weeks of regular use. They’re not a good long-term solution, and they’re particularly risky for adults over 65, where antihistamines can cause confusion, cognitive impairment, and delirium.

Melatonin and Natural Supplements

Melatonin is the most popular supplement for sleep and doesn’t require a prescription. It works best for circadian rhythm issues, like jet lag or a sleep schedule that’s shifted too late, rather than for general insomnia. Cleveland Clinic recommends starting at 1 mg and increasing by 1 mg each week, up to a maximum of 10 mg, until you find the dose that helps you fall asleep faster. Many people start too high, which can actually worsen sleep quality.

Other supplements like magnesium and valerian root are commonly marketed for sleep, but the clinical evidence behind them is weaker and less consistent than for melatonin. None of these supplements are regulated as strictly as medications, so quality varies between brands.

When You Need a Prescription

Prescription sleeping pills are generally reserved for people whose insomnia is persistent and disruptive. Clinically, insomnia is defined as difficulty falling asleep, staying asleep, or waking too early at least three nights per week for three months or longer, despite having adequate opportunity to sleep. You don’t need to meet that exact threshold to talk to a doctor, but it gives you a sense of when the medical system treats sleep trouble as a condition worth medicating.

If OTC options haven’t worked and your sleep problems are affecting your daily life, a prescription is the next step. Several classes of medication exist, and your doctor will match one to your specific pattern:

  • Medications that help you fall asleep faster include zolpidem (Ambien), eszopiclone (Lunesta), and zaleplon (Sonata). These are sometimes called Z-drugs.
  • Medications that block your brain’s wake signals include suvorexant (Belsomra), lemborexant (Dayvigo), and daridorexant (Quviviq). These are newer and generally carry a lower dependency risk.
  • Medications that work on your melatonin system include ramelteon (Rozerem), a prescription-strength option for people who struggle specifically with falling asleep.
  • Benzodiazepines like temazepam (Restoril) and triazolam (Halcion) are older options that doctors prescribe less frequently now due to dependency concerns.

How to Get a Prescription

You have two main routes: your primary care doctor or a telehealth platform. Most primary care physicians can prescribe sleep medications and will do so after evaluating your symptoms. You don’t necessarily need a sleep specialist unless your doctor suspects an underlying condition like sleep apnea.

Telehealth is a fully legitimate option. Through at least December 2026, federal rules allow practitioners to prescribe even controlled substances (which includes most prescription sleep medications) via video visit without requiring an in-person exam first. Platforms like Cerebral, Done, and others offer sleep consultations, though availability varies by state. Your regular doctor’s office may also offer virtual visits.

Whichever route you choose, come prepared. Before your appointment, track your sleep for at least one to two weeks. Note what time you go to bed, how long it takes you to fall asleep, how often you wake during the night, and what time you get up. Also note caffeine and alcohol intake, any medications or supplements you’re already taking, and how your sleep trouble affects your day. Bringing a bed partner who can report on your snoring or restlessness is also helpful.

Your doctor will ask detailed questions: whether you doze off during the day, whether you snore or gasp awake, whether you feel an uncomfortable urge to move your legs at night. These help rule out conditions like sleep apnea or restless legs syndrome, which require different treatment entirely. Being thorough and honest speeds up the process.

Dependency and Safety Risks

Prescription sleep medications carry real risks that explain why doctors don’t hand them out casually. Physical dependence on benzodiazepines can develop within two weeks of daily use. Z-drugs like zolpidem and eszopiclone are often assumed to be safer alternatives, but according to Kaiser Permanente’s clinical guidelines, they are not safer than benzodiazepines, and switching from one to the other doesn’t improve safety.

The FDA requires its strongest warning label on zolpidem, eszopiclone, and zaleplon for a specific reason: rare but serious episodes of sleepwalking, sleep-driving, and other complex behaviors while not fully awake. These episodes have resulted in injuries and deaths. If you’ve ever experienced one of these behaviors on a sleep medication, you should not take that class of drug again.

For adults over 65, the risks are amplified. The American Geriatrics Society’s Beers Criteria flags benzodiazepines, barbiturates, and antihistamines as potentially inappropriate for older adults due to impaired metabolism, cognitive decline, falls, and overdose risk. Newer options like the orexin receptor blockers tend to be better tolerated in this group, but the conversation with your doctor matters more as you age.

What Doctors Often Try First

Many doctors will suggest cognitive behavioral therapy for insomnia (CBT-I) before or alongside medication. This is a structured program, typically four to eight sessions, that retrains your sleep habits and addresses the anxiety cycle that keeps insomnia going. It has strong evidence behind it and produces improvements that last after treatment ends, unlike medication, which only works while you’re taking it.

CBT-I is available in person, through telehealth, and even through apps. If your doctor recommends it, it’s not a brush-off. It’s the treatment most likely to solve the problem permanently rather than manage it. That said, many people benefit from a combination of short-term medication to break the cycle of sleepless nights while building better habits through CBT-I.