Ambien (generic name: zolpidem) is a sedative-hypnotic medication primarily used to treat insomnia. It is commonly prescribed for individuals who have difficulty falling asleep or staying asleep. Ambien works by slowing down brain activity, allowing you to fall asleep more easily.