Ambien is a brand name for the drug zolpidem, which belongs to a class of drugs called sedative-hypnotics. It is used for the short-term treatment of adults who have trouble falling asleep (insomnia). Ambien works by acting on the brain to produce a calming effect, helping people fall asleep faster and stay asleep throughout the night. It comes in different forms, including immediate-release tablets and extended-release tablets. Ambien is generally safe in the short term, but some people who take it may behave dangerously, such as driving while not awake. It is important to take Ambien exactly as prescribed by a doctor and to inform the doctor of any medical conditions, including a history of depression, mental illness, drug or alcohol abuse, kidney or liver disease, lung disease, breathing problems, sleep apnea, or myasthenia gravis.