Xanax vs Ambien. Which one is more potent against sleeplessness and anxiety? <br>Depending on a person\s needs and preferences, different medicines may work best to treat anxiety and insomnia. While Xanax is typically considered to be more effective at treating anxiety, Ambien is frequently perceived to be better at treating insomnia. Both medications, however, have the potential to cause adverse effects like weariness, wooziness, and lightheadedness. It is crucial to examine the benefits and drawbacks of any drug with a medical expert before using it.