Insomnia is ongoing difficulty falling or staying asleep that affects daytime functioning. The most effective first-line treatment is improving sleep habits and CBT for insomnia; medication is used short-term and cautiously.
Most adults do best with about 7–9 hours, though needs vary. Quality and consistency matter as much as the total.