Both Ambien and Zolpidem treat a variety of sleep disorders, anxiety, and primary insomnia. Short-term use of Ambien improves sleep quality and reduces sleep latency.