How to diagnose Insomnia ? 

Your doctor will likely diagnose insomnia based on your medical and sleep histories and a physical exam. He or she also may recommend a sleep study. For example, you may have a sleep study if the cause of your insomnia is unclear.
                
Medical History
                
To find out what's causing your insomnia, your doctor may ask whether you:
                
Have any new or ongoing health problems
                
Have painful injuries or health conditions, such as arthritis
                
Take any medicines, either over-the-counter or prescription
                
Have symptoms or a history of depression, anxiety, or psychosis
                
Are coping with highly stressful life events, such as divorce or death
                
Your doctor also may ask questions about your work and leisure habits. For example, he or she may ask about your work and exercise routines; your use of caffeine, tobacco, and alcohol; and your long-distance travel history. Your answers can give clues about what's causing your insomnia.
                
Your doctor also may ask whether you have any new or ongoing work or personal problems or other stresses in your life. Also, he or she may ask whether you have other family members who have sleep problems.
                
Sleep History
                
To get a better sense of your sleep problem, your doctor will ask you for details about your sleep habits. Before your visit, think about how to describe your problems, including:
                
How often you have trouble sleeping and how long you've had the problem
                
When you go to bed and get up on workdays and days off
                
How long it takes you to fall asleep, how often you wake up at night, and how long it takes to fall back asleep
                
Whether you snore loudly and often or wake up gasping or feeling out of breath
                
How refreshed you feel when you wake up, and how tired you feel during the day
                
How often you doze off or have trouble staying awake during routine tasks, especially driving
                
To find out what's causing or worsening your insomnia, your doctor also may ask you:
                
Whether you worry about falling asleep, staying asleep, or getting enough sleep
                
What you eat or drink, and whether you take medicines before going to bed
                
What routine you follow before going to bed
                
What the noise level, lighting, and temperature are like where you sleep
                
What distractions, such as a TV or computer, are in your bedroom
                
To help your doctor, consider keeping a sleep diary for 1 or 2 weeks. Write down when you go to sleep, wake up, and take naps. (For example, you might note: Went to bed at 10 a.m.; woke up at 3 a.m. and couldn't fall back asleep; napped after work for 2 hours.)
                
Also write down how much you sleep each night, as well as how sleepy you feel throughout the day.
                
You can find a sample sleep diary in the National Heart, Lung, and Blood Institute's "Your Guide to Healthy Sleep."
                
Physical Exam
                
Your doctor will do a physical exam to rule out other medical problems that might cause insomnia. You also may need blood tests to check for thyroid problems or other conditions that can cause sleep problems.
                
Sleep Study
                
Your doctor may recommend a sleep study called a polysomnogram (PSG) if he or she thinks an underlying sleep disorder is causing your insomnia.
                
Youll likely stay overnight at a sleep center for this study. The PSG records brain activity, eye movements, heart rate, and blood pressure.
                
A PSG also records the amount of oxygen in your blood, how much air is moving through your nose while you breathe, snoring, and chest movements. The chest movements show whether you're making an effort to breathe.