Insomnia also can make it hard to remember things. It may make it dangerous to drive because of daytime sleepiness. Insomnia may be caused by food or stress. It can also be caused by other medical problems or medications. But insomnia does not always have a known cause. Insomnia is usually treated with lifestyle changes, counseling, medications or a combination of these treatments.