If you suffer from insomnia, the prescription medicine Ambien can help you treat sleeping disorders. Ambien is a sleeping pill, the brand name for zolpidem, is a prescription medication used to treat insomnia. It belongs to a class of drugs called sedative-hypnotics, which work by affecting chemicals in the brain that may be unbalanced in people with sleep problems. It helps you fall asleep as soon as you go to bed.