How does the 'body clock' work?
The hormone melatonin is largely responsible for the regulation of the body clock throughout our lives. Melatonin is produced in the brain, in the pineal gland. Its production rate is dictated by natural light, so that during hours of darkness (the normal sleep period) melatonin production increases, and as morning approaches and with the coming of daylight, melatonin production is once again shut down.
Of course there is some natural variation in circadian alertness during the daytime. For example, you will probably be aware of the afternoon dip when we tend to feel temporarily rather more tired. Indeed, in some societies it is normal to have a “siesta” at this time because it also coincides with the hottest part of the day. In terms of our circadian tendencies there is much to be said for that lifestyle!
Read up on What controls our sleep pattern?