Sleep timing is controlled by the circadian clock, sleep-wake homeostasis, and in humans, within certain bounds, willed behavior. The circadian clock—an inner timekeeping, temperature-fluctuating, enzyme-controlling device—works in tandem with adenosine, a neurotransmitter that inhibits many of the bodily processes associated with wakefulness. Adenosine is created over the course of the day; high levels of adenosine lead to sleepiness[citation needed]. In diurnal animals, sleepiness occurs as the circadian element causes the release of the hormone melatonin and a gradual decrease in core body temperature. The timing is affected by one's chronotype. It is the circadian rhythm that determines the ideal timing of a correctly structured and restorative sleep episode.[17]
Homeostatic sleep propensity (the need for sleep as a function of the amount of time elapsed since the last adequate sleep episode) must be balanced against the circadian element for satisfactory sleep.[18] Along with corresponding messages from the circadian clock, this tells the body it needs to sleep.[19] Sleep offset (awakening) is primarily determined by circadian rhythm. A person who regularly awakens at an early hour will generally not be able to sleep much later than his or her normal waking time, even if moderately sleep-deprived.