It's unlikely you'll become dependent on zolpidem (Ambien). Ambien and similar sleep medications are effective and much less likely to be habit-forming than are some other drugs sometimes prescribed for sleep problems — for example, benzodiazepines, such as alprazolam (Xanax), lorazepam (Ativan) or temazepam (Restoril).
However, relying on a sleep medication generally isn't the best long-term solution for insomnia. Medications can mask an underlying problem that needs treatment. They can also cause side effects.
For example, some people who take Ambien and similar medications such as eszopiclone (Lunesta) do things while asleep that they don't remember — such as driving, or preparing and eating food. Because you're not awake, these are dangerous behaviors. In rare cases, these medications may trigger a life-threatening allergic reaction (anaphylaxis). Some recent studies suggest possible links between certain sleep medications and increased risk of death and cancer, but much more work needs to be done to sort out these relationships.
Sleep medications can be useful in the short term — but the best approach is to address whatever's causing your sleep problems in the first place. If you still have trouble sleeping, other therapies include learning new sleep habits (such as keeping your bedtime and wake time consistent from day to day), getting counseling for anxiety or other psychological concerns, and using stress-reduction techniques.