Insomnia can be classified into two main types: primary and secondary. Primary insomnia is not directly associated with any other health condition or problem. Secondary insomnia, also known as comorbid insomnia, occurs due to another condition such as [depression](), [anxiety](), [neurological disorders](), or [medication]().