Insomnia is often associated with old age, as the older people become the less easily they are able to fall asleep and stay asleep in a satisfying way. Sleeplessness can lead to real health concerns, though, so if you experience insomnia which lasts more than a week, it is a good idea to consult with a health care professional about it and seek some sort of treatment -- either relaxation or meditation, changing your dietary habits, or medication.
The most common type of insomnia is known as primary insomnia, and is not associated with any other health or medical condition. Secondary insomnia, however, affects approximately 8 out of 10 people and this is, in fact, caused by some other condition including side effects of medicine or substances.
This article gives you more information on the 4 types of insomnia you need to know about
In contrast, primary insomnia isn't due to a medical problem, medicines, or other substances. It is its own disorder.