We include products we think are useful for our readers. If you buy through links on this page, we may earn a small commission. Here’s our process.

Sleeping pills come in many forms, such as supplements, and people can buy many of them over-the-counter pills. However, many people can fall asleep by practicing good sleep hygiene practices and trying alternative techniques and behaviors.

Quick links

When a person has insomnia, they may have trouble falling or staying asleep, wake up too early, or not feel refreshed upon waking.

However, many people may not need sleeping pills to treat insomnia. Lifestyle adjustments, such as exercising and avoiding alcohol and nicotine, can often improve a person’s sleep cycle and prevent insomnia. Changing the sleep environment, such as replacing an old mattress, might also help.

Learn about the best mattresses for sleep disorders here.

If making these adjustments does not help treat severe insomnia, a sleeping pill may be a good short-term solution.

There is a range of sleeping pills available to buy, including supplements and other over-the-counter (OTC) medications. Anyone with ongoing insomnia should consult their doctor about the best approach.

Please note that the writer of this article has not tried these products. All information presented is purely research-based.


The brain produces the hormone melatonin. Melatonin regulates the sleep-wake cycle by telling the body that it is almost time for sleep.

The brain makes less melatonin when it is light outside and more when it is dark, such as during the winter. Age also plays a role — as a person ages, they produce less melatonin.

Learn about using melatonin for children here.

Many sleeping aids contain melatonin. They tend to be most effective for people with circadian rhythm sleep disorders, which are problems with the timing of sleeping or waking up.

Melatonin can bebeneficial for people:

  • experiencing jet lag
  • having trouble falling asleep at night
  • coping with shift work

In recent years, manufacturers have marketed snacks and drinks that contain melatonin as “relaxation” products. However, doctors do not know if they are effective.

Learn about types of melatonin products here.

Melatonin supplements are available without a prescription from drug stores, supermarkets, and online shops. Melatonin is available in dosages of 1-10 milligrams (mg), and a person should take them at bedtime. How long the effects last depend on the dosage taken.

Learn more about how long melatonin lasts here.

It is possible to overdose on melatonin, so people should always follow product instructions or talk with a doctor about safe dosages.

Limited evidence suggests that melatonin can treat insomnia. Although there are mixed findings, most research, including a 2017 meta-analysis, indicates that it can reduce the time it takes to fall asleep.

Experts do not know if melatonin is safe to use during pregnancy.

Learn more about using melatonin for sleep here.

Valerian root

Valerian root is a common ingredient from the valerian plant. Many herbal supplements contain valerian to improve sleep, relieve anxiety, and support relaxation.

Learn about the similarities and differences between valerian and melatonin here.

The supplements come in many forms, such as teas, liquids, and capsules. They may suit people who do not want to take pills or medication.

Several clinical studies show that taking valerian can improve sleep quality in people with insomnia. However, not enough evidence is available to confirm whether valerian root is an effective sleep aid.

Learn more about if valerian root can help anxiety and insomnia here.

The safety profile of valerian root remains unclear. Possible side effects may include headaches, dizziness, itchiness, and stomach problems. Some people feel groggy or drowsy in the morning after taking valerian root.

Because the medical community is still unsure of the effects, people who are pregnant and children under 3 years should not use valerian.

Valerian root-based sleep aids are available in drug stores, health food stores, and online shops. People should speak to their doctor for advice on safety and dosage.

Learn about other natural sleep supplements here.

Sedating antihistamines

Sedating antihistamines can help people who have trouble falling or staying asleep.

Some OTC antihistamines, which people usually use to treat allergies, can cause drowsiness.

Learn more about antihistamines here.

Not all antihistamines have this effect. Some people use sedating antihistamines, also known as first-generation antihistamines, to promote sleep or relieve tension and anxiety.

The following are sedating antihistamines:

  • diphenhydramine, the active ingredient in Benadryl
  • doxylamine, the active ingredient in Unisom
  • cyclizine, the active ingredient in Marezine

Second-generation antihistamines are less likely to cause drowsiness. People use them to treat long-term allergy symptoms, and they are not effective as sleeping aids.

The following are nonsedating antihistamines:

  • cetirizine, the active ingredient in Zyrtec
  • loratadine, the active ingredient in Claritin
  • fexofenadine, the active ingredient in Allegra

Learn about the differences between Zyrtec and Claritin here.

A doctor may recommend a sedating antihistamine, but only as a short-term solution. Though they are not addictive, the body gets used to them quickly, so they become less effective over time.

It is possible to overdose on antihistamines, so people should always follow product instructions or talk with a doctor to determine a safe dosage.

Learn about the risks and how to take antihistamines safely here.

Always follow the instructions for OTC sleeping aids, including valerian products and antihistamines containing diphenhydramine or doxylamine.

The American Academy of Sleep Medicine offers the following advice for people taking sleeping pills:

  • never take a pill without a doctor’s approval
  • do not drink alcohol before using the medication
  • take the first dose when you have planned no activities for the following morning
  • do not operate a vehicle or heavy machinery after taking a sleeping pill
  • contact a doctor right away if any complications occur

Sedating medications, including antihistamines, can leave people feeling tired, drowsy, or groggy during the following day. In older adults, using these pills can cause memory problems.

In rare cases, they can cause people to perform actions, including driving, walking, eating, or making phone calls, while asleep. This is commonly known as sleepwalking.

Some sleeping pills may also interfere with:

Do not take any sleeping aids before driving or operating machinery.

The following are commonly asked questions and answers about sleeping pills.

When should a person use sleeping pills?

The best time to take melatonin will depend on the nature of the sleep problem:

  • Sleeping pills for insomnia: A person with insomnia should take a sleeping aid, which includes valerian and sedative antihistamines, just before or at bedtime.
  • Sleeping pills for jet lag: Melatonin is a good option if tackling jet lag. Take melatonin several hours before the intended bedtime every day throughout the trip and a few days afterward.
  • Sleeping pills for shift work: Melatonin may also be the best option for people managing shift work. Taking melatonin at the end of a shift can help prepare the body for bed.

People taking sedating antihistamines should follow the directions on the medication or the advice of a medical professional.

When to take valerian depends on the type a person uses. Generally, people can take valerian an hour before going to bed. People should follow the recommended dosage for supplements.

Learn more about valerian dosage here.

How to choose the best sleeping pill

The best type of sleeping pill for a person will depend on the cause of sleep issues and a person’s sleep patterns. People with insomnia may benefit from one medication, while those with jet lag experience the best results from another.

People may want to start with a low-dose melatonin product or a valerian root supplement. If they do not experience improved sleep, they can look into a higher dosage.

The best way to determine the most suitable sleeping pill or dosage is to consult with a doctor for personalized recommendations.

What are ways to fall asleep naturally?

A range of practices can help encourage sleep naturally, including:

  • Regular exercise: People can engage in physical activity several hours before bedtime to encourage sleep.
  • Avoiding stimulants: Avoid caffeine, nicotine, and alcohol for several hours before bedtime.
  • Sleep schedule: Maintain the same sleep schedule where possible, even on days off, going to sleep and waking up at the same time.
  • Sleep environment: Keep the bedroom dark, quiet, and slightly cool to encourage comfortable sleep.
  • Avoid screens: People should stop using screens, such as smartphones, TVs, and personal devices, at least 1 hour before bed.

Learn more about ways to fall asleep naturally here.

OTC sleeping pills may contain an antihistamine or melatonin.

Sleeping aids can help a person get much-needed rest, but most are only suitable for short-term use. Only take sleeping pills when insomnia is more severe than occasional sleeplessness.