Here’s an overly simplistic explanation of sleep: it’s part of the circadian rhythm of life and is hardwired into the biology of persons and animals. Your brain wants to sleep when it gets dark and wake when it is light.
That’s partly true, but it’s not the whole story. A more precise explanation is that the sleep cycle stems from an interaction between the circadian clock and a separate sleep-wake homeostatic process. The "sleep homeostat" is, roughly, an accounting of the amount of sleep you’ve experienced recently and a drive to return to balance. It causes the sleep drive to be based on how much sleep you’ve got in the past, and is directly related to the concept of sleep debt or sleep deficit. The sleep homeostat is similar to the hunger homoestat. If you haven’t eaten in a while, you’re likely to be hungry regardless of the time of day. If you had a feast at lunch, you may not be hungry come dinnertime. Likewise, if you’ve stayed awake all night, you’ll probably feel like sleeping in the morning, even if the Sun is up.
Cues such as daylight and regularly scheduled social and family activity have powerful influences on how sleepy or awake a person feels. These cues affect the internal clock. Disturbances of the normal circadian rhythmicity can result in serious health consequences, including psychiatric disorders, such as depression. When sleep patterns are pushed around these are called circadian rhythm sleep disorders. Nature magazine reports that some experts estimate half of adults have rhythms that are out of sync with their daily schedules. This disconnect may not rise to the level of circadian rhythm disorder, but it can put sleep stress on people who have it. A word for this phenomenon is "social jet lag".
Blind people often experience sleeping problems because their retinas are unable to detect light and they don’t have the circadian cues of daylight and night. Shift workers try to run their lives out of sync with light and dark cycles and consequently have problems.
To reduce the effects of jet lag, therapists try to manipulate the biological clock with a technique called light therapy. They expose people to special lights, many times brighter than ordinary household light, for several hours near the time the subjects want to wake up. This helps them reset their biological clocks and adjust to a new time zone. The chronobiotic hormone melatonin is also taken as a supplement to force a change in cycle alignment. Other behavior can push the body’s cycle around. The shift in meal times has been shown to shift the circadian cycle of people who fast during Ramadan.
When people have circadian rhythm sleep disorders or when the cycle gets thrown off and they experience sleep and wakefulness at inappropriate times because of travel or because of work schedule, qualty of life can be affected. Moods and learning ability can suffer and the person may be less effective on the job
Disturbed circadian rhythms are correlated with many mental and physical disorders including sleep disorders. People with circadian rhythm disruptions are more apt to get metabolic syndrome and gastrointestinal problems and other illnesses.
Circadian rhythms are ubiquitous in the animal kingdom, and are a cellular property. Neurons in a dish can act as clocks. The genes responsible for this cyclic behavior have begun to be identified. Clocks enable organisms to adapt to their surroundings. Although scientists currently believe that clocks arose through independent evolution and may use different clock proteins, they all share several regulatory characteristics. In particular, they are maintained by a biochemical process known as a negative feedback loop. Another hormonal cycle related to sleep is a reciprocal interaction of the neuropeptides growth hormone-releasing hormone and corticotropin-releasing hormone.
The body has complex biochemistry for producing these rhythms. In systems engineering terms, both positive and negative regulators work at the cellular level. Geneticists have named genes (or more precisely transcription factors) CLOCK, NPAS2, and BMAL1. The proteins created by these factors are called PER and CRY, and they interact with the genetic blueprint to stop their own production.
An article in Nature conceded “the molecular clock model is continuously evolving,” although some of the proteins involved have been identified and some of the feedback mechanisms have been elucidated.
Dissecting the mechanism of our internal clock - from the National Center for Biotechnology Information