Your doctor may suggest you some treatment options for insomnia based on the diagnosis results. Once the doctor finds the cause for insomnia, it is important to manage and control the underlying problem, as it can help to eliminate the disease all together. If it is because of any psychological problem, he may suggest some relaxation trainings and behavioral therapies to reduce your symptoms of insomnia. In some cases, changing your sleep pattern may help in getting quality sleep. It is to be understood that the quality of sleep is only significant than the number of hours you spend in bed.
Changing your life style habits such as avoiding the use of nicotine, caffeine and alcohol can help you in getting sleep if those were the underlying causes.
There are certain medications for insomnia your doctor may prescribe based on the symptoms and its severity.
Also there are some medications which can help you in getting sleep if that is a persistent problem.