Ambien (zolpidem) is a potent prescription sedative used for the short-term treatment of insomnia, meaning it cannot legally or safely be purchased without a valid prescription from a licensed healthcare provider. To begin the process properly, you should consult a doctor who can evaluate your sleep issues and determine if the medication is appropriate for you.