Sleep is incredibly complicated.
"The neurobiology of sleep: genetics, cellular physiology and subcortical networks
Edward F. Pace-Schott and J. Allan Hobson
Conclusions
Over the past decade, a remarkable explosion of new findings has allowed us to construct a much more complete picture of the genetic mechanisms, cellular neurophysiology and subcortical networks that underlie the neurobiology of sleep. This explosion has been made possible by technological advances in molecular biology and biotechnology (such as gene cloning and DNA sequencing), as well as in cellular neurophysiology (such as sophisticated combinations of microdialysis, unit recording, axonal tracers and immunohistochemistry). We now know that an interlocking positive - negative feedback mechanism that controls gene transcription in individual cells of the SCN of the hypothalamus is the molecular basis of circadian rhythmicity in mammals. This endogenous periodicity can be entrained to the ambient photoperiod by photons that impinge on the circadian photopigment,melanopsin, in RGCs, which convey this information to the SCN monosynaptically through the RHT. Circadian rhythmicity emerges from SCN cells by action potentials that impinge on adjacent nuclei of the anterior hypothalamus, including the PVH, SPZ and DMH; in turn, these nuclei convey circadian rhythmicity to structures that control rhythmic physiological processes, such as sleep, temperature and endocrine output. Feedback to the SCN circadian oscillator can occur through melatonin from the pineal gland, which reliably secretes this sleep-related hormone in response to polysynaptically conveyed signals from the SCN. A key hypothalamic structure that receives circadian output from the SCN through the SPZ and the DMH is the VLPO, which promotes NREM sleep. The VLPO might initiate sleep onset through reciprocal inhibition of cholinergic, noradrenergic and serotonergic arousal systems in the brainstem, as well as histaminergic systems of the posterior hypothalamus and cholinergic systems of the basal forebrain, all of which are modulated by the orexinergic arousal system of the lateral hypothalamus. These arousal systems conspire to promote the activated brain states of waking,whereas the cholinergic system acts alone to promote the activated state of REM sleep."
-
http://www.baillement.com/sleep-neurobio.html
But don't lose sleep over the specifics.
"Here are 10 tips on how to sleep soundly at night and at the same time improve the quality of your sleep.
1. Importantly established a bedtime routine and stick to it. What time to bed and what time to wake up.
2. Do exercise regularly. Exercise will tired your body that will enable you to sleep and refresh yourselves when you wake up. But do not exercise 2 hours before sleep.
3. Avoid heavy meals close to bed time. Eat 3 hours before sleep to allow for digestion.
4. Do not consume caffeine, especially in the evening and avoid alcohol before going to bed. Caffeine causes insomnia and alcohol will interrupt your sleep with frequent awakenings, headaches, night sweats and even nightmares.
5. Cut down on fluids intake by 8pm. You do not want to wake up in the middle of the night to relieve ourselves.
6. Ensure that your bedroom is cool or airy, dark and quiet. Always maintain peaceful room environment that will allow you to sleep faster and soundly. And also ensure that your bedroom is only function for sleeping not for reading or use as a study room and etc.
7. Stay away from the evening news before bedtime. Negative stories of crime and disaster appear as back flash in your thought as you lay down trying to sleep. It can even appear in your dream.
8. Develop a nightly sleep ritual. Example, take a warm bath before bed, listening to quiet soothing white music and etc.
9. Focus your mind on pleasant thoughts, count sheep or count backward whichever works best. Shut off all worldly thoughts while drifting to sleep.
10. Invest in a good bed. Seek your nearest bed supplier for recommendation and advice. Your sleeping environment plays an important role, a prelude to a good sleep. It should be quite, cozy and inviting."
-
http://menshealthmedicine.blogspot.com/2012/02/10-tips-to-sleep-soundly-tonight.html
But if the "simple tricks" arne't working, it may really be worthwhile getting evaluated at a "sleep center" at a nearby hospital.