Insomnia is often a symptom of other medical problems.
The first symptom of major depression, for instance, may be insomnia. People with bipolar disorder, anxiety or other mood disorders often have insomnia, too. Disorders for which pain is a constant companion, such as arthritis and fibromyalgia, can cause insomnia. Similarly, medical problems that cause itching may disturb sleep.
People with dementia often have trouble with sleep. Many people with Alzheimer's have "sundown syndrome," in which they get confused and agitated around sunset. This can continue into the night, disrupting sleep. The motor symptoms of Parkinson's disease can cause people with Parkinson’s disease to awaken repeatedly during the night, and some Parkinson's medications also interfere with sleep. Many people getting dialysis for end stage renal disease experience insomnia. If you have a chronic illness and you are having sleep disturbances, talk with your doctor.
Many sleep disorders can have insomnia as a symptom. In circadian rhythm sleep disorders, the rhythm of the internal "clock" that controls timing of sleep and wakefulness is altered. People with narcolepsy may wake up frequently at night in addition to falling asleep at inappropriate times during the day. Restless legs syndrome causes an overwhelming urge to move the legs, which can interfere with sleep.
Some people who complain of insomnia are eventually diagnosed with obstructive sleep apnea, a disorder in which people stop breathing repeatedly as they sleep, causing them to wake up over and over. They may not remember waking up, but often feel that they aren't getting a good night's sleep. A bed partner may notice choking sounds or loud snoring.
In some cases, treating the underlying medical problem will take care of the insomnia, but this isn't always true. And for some diseases, the medications used for treatment may also cause insomnia.