Ambien is a brand name for the drug zolpidem, which is a sedative-hypnotic medication primarily used to treat insomnia, a sleep disorder characterized by difficulty falling asleep, staying asleep, or both. Ambien is prescribed to help individuals fall asleep faster and stay asleep longer. It works by affecting certain chemicals in the brain that may be unbalanced in people with sleep problems.