Dealing with trouble getting asleep can be difficult. Insomnia, a common issue, is characterized by trouble keeping sleep or experiencing unrestful rest. Various factors, including anxiety, unhealthy sleep habits, certain prescriptions, and hidden medical problems, can contribute to this problem.