Insomnia is characterized by difficulty falling asleep and staying asleep.
There are three distinct types of insomnia: initial insomnia when we have difficulty falling asleep at night, middle insomnia when we have prolonged wakefulness at night, and terminal insomnia when it occurs at the end of the night.
It may be caused by poor sleep hygiene habits. The more you can focus on good sleep habits, the better chance you have of avoiding insomnia. It may also be caused by psychological factors (anxiety, depression) or physical factors (pain).