Ambien, generically known as Zolpidem Zolpidem Zolpidem , is a prescription compound primarily indicated to manage insomnia . This quickly-acting hypnotic works by affecting certain substances in the brain to induce rest . It's typically taken just shortly before g