A Sleeping Pill for Restful Nights Ambien is a widely prescribed sleep medication designed to help individuals struggling with insomnia achieve restful nights of sleep. This medication, also known by its generic name zolpidem, works by affecting certain chemicals in the brain that may be imbalanced in people with sleep problems.