Ambien is primarily prescribed for adults who have difficulty falling asleep. It is generally intended for short-term use while the underlying cause of insomnia is evaluated or treated. Persistent sleep problems may require lifestyle changes, cognitive behavioral therapy for insomnia (CBT-I), or treatment of an underlying medical condition.