Lunesta and Ambien: What They Do. 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 powerful drugs decrease brain activity and produce a sense of calm and they can help you fall asleep. Both medications are intended for short-term use, and either one can become habit-forming.