Ambien belongs to a class of medicines called sedative-hypnotics and is usually taken right before b…