Many things can make it difficult to fall asleep or stay asleep here and there. But trouble falling asleep consistently is known as insomnia.

If insomnia routinely keeps you from getting restful sleep, you should see your doctor. They may recommend changes to your sleeping habits or lifestyle.

If those don’t do the trick and your insomnia isn’t caused by an underlying condition, there are medications that can help.

Lunesta and Ambien are two commonly prescribed drugs for short-term use for insomnia. Lunesta is a brand name for eszopiclone. Ambien is a brand name for zolpidem.

Both of these medications belong to a class of drugs called sedative-hypnotics. These medications are prescribed to people ages 18 years and older who have trouble sleeping.

Taking one of these drugs may be just what you need to get a good night’s sleep. Learn more about their similarities and differences, as well as how to talk to your doctor if you think one of these drugs may be a good option for you.

Ambien and Lunesta decrease brain activity and produce a sense of calm. This can help you fall and stay asleep. Lunesta and Ambien are both intended for short-term use. However, they differ in their strengths and how long they work in your body.

For example, Ambien is available in 5-mg and 10-mg immediate-release oral tablets. It’s also available in 6.25-mg and 12.5-mg extended-release oral tablets, called Ambien CR.

Lunesta, on the other hand, is available in 1-mg, 2-mg, and 3-mg immediate-release oral tablets. It isn’t available in an extended-release form.

However, Lunesta is longer acting. It may be more effective in helping you stay asleep than the immediate-release form of Ambien. That said, the extended-release form of Ambien may help you stay asleep longer.


You may be able to improve your sleep by:

  • keeping the same bedtime every night
  • avoiding naps
  • limiting caffeine and alcohol

The typical dose of Lunesta is 1 milligram (mg) per day, for both men and women. If that doesn’t work, your doctor will increase it slowly.

The typical dosage of Ambien is higher. For the immediate-release tablets, it’s 5 mg per day for women and 5 mg to 10 mg per day for men. The typical dosage of extended-release Ambien is 6.25 mg for women and 6.25 mg to 12.5 mg for men. Your doctor may have you try the immediate-release form first, and then switch you to the extended-release form if needed.

You take these drugs just before you’re ready to go to bed. It’s important that you don’t take them unless you have time for seven or eight hours of sleep. Also, they won’t work well if you eat a heavy or high-fat meal before you take them. So it’s best to take them on an empty stomach.

With either medication, your dosage will be based on your gender, age, and other factors. Your doctor will probably start you on a low dose to keep the side effects to a minimum. They can adjust the dosage up or down as needed.

FDA warning

In 2013, the Food and Drug Administration (FDA) issued a safety announcement for Ambien. For some people, this drug caused lingering effects the morning after taking it. These effects impaired alertness. Women seem more likely to be affected because their bodies process the drug more slowly.

Common side effects

Common side effects of both drugs are lightheadedness and dizziness. You may also have continued sleepiness during the day. If you feel lightheaded or sleepy, don’t drive or use dangerous machinery.

Rare side effects

Both drugs have the potential for some rare but serious side effects, including:

  • memory loss
  • behavior changes, such as becoming more aggressive, less inhibited, or more detached than normal
  • depression or worsened depression and suicidal thoughts
  • confusion
  • hallucinations (seeing or hearing things that aren’t real)

Unconscious activity

Some people taking these drugs sleepwalk or do unusual things in their sleep, such as:

  • making phone calls
  • cooking
  • eating
  • driving
  • having sex

It’s possible to do these things and have no memory of them later. The risk of this side effect is greater if you drink alcohol or use other central nervous system (CNS) depressants while taking either of these drugs. You should never mix alcohol and sleeping pills.

To help prevent unconscious activity, don’t take a sleeping pill if you have less than eight full hours available for sleep.

Neither Lunesta or Ambien should be taken with:

Some other substances that can interact with these drugs are detailed in the Healthline articles on eszopiclone (Lunesta) and zolpidem (Ambien).

Tell your doctor and pharmacist about all the medications that you take, including over-the-counter drugs and supplements or herbal products.

Don’t drink alcohol while using sleeping pills.

Both drugs carry the risk of dependency and withdrawal. If you take high doses of either one or use it for more than 10 days, you may develop a physical dependency. You’re at greater risk of developing a dependency if you’ve had substance misuse problems in the past.

Stopping suddenly can lead to withdrawal symptoms. Symptoms of withdrawal include shakiness, nausea, and vomiting. To avoid withdrawal symptoms, speak to your doctor about reducing your dose a little at a time.

Special warning for Ambien CR

If you take Ambien CR, you shouldn’t drive or engage in activities that require you to be completely alert the day after you take it. You may still have enough of the drug in your body the next day to impair these activities.

Both Lunesta and Ambien are effective, but it’s difficult to know in advance which one will work best for you. Discuss the pros and cons of each with your doctor.

Be sure to mention all your existing medical issues and drugs you currently take. Your insomnia may be a symptom of another medical condition. Treating the underlying condition could clear up your sleep problems. Also, a list of all over-the-counter medications, supplements, and prescriptions drugs you take can help your doctor to decide which sleep aid you should try and in what dose.

If you experience any serious side effects, be sure to report them to your doctor right away. If one medication doesn’t work out, you may be able to take a different one.