Your doctor will ask about your sleeping routines, how much alcohol and caffeine you drink each day and your general lifestyle habits, such as diet and exercise.
They will check your medical history for any illnesses or medications that may be contributing to the insomnia. Your doctor will ask if you are taking any other substances. For example, drugs. In many cases, a cause of insomnia can be identified through these simple measures.
If the cause is not immediately obvious, your doctor may suggest you keep a sleep diary to show when you went to sleep, how long for, and whether you were disturbed in the night.
A polysomnography is a physical test for identifying sleeping problems, although this is mainly used to diagnose sleep apnea. Sensor leads (electrodes) are placed on various places on your body, including the torso and head. While you are asleep, the test will record:
If carried out in a sleep research center (rather than your home) you may also be videotaped during the test, to compare the electronic readings with what was happening in the room.