Some animals have what is called endogenous circannual rhythms. This is not the same things as circadian rhythms. Circannual rhythms is a yearly cycle and it determines things such as the migration patterns seen in birds and animals storing food for winter.
All animals have endogenous circadian rhythms. These rhythms are more commonly known. They operate on an approximately 24 hour cycle. Most people average slightly more than 24 hours, so since this cycle is longer in most people the cycle has to be reset every single day. Circadian rhythms regulate the sleep/wake cycle, how often you eat and drink, your body temperature, the secretion of hormones, when you go to the bathroom, and your sensitivity to drugs.
A zeitgeber is a term used to describe any stimulus that resets the circadian rhythms. Light is the primary one. Other zeitgeber’s are exercise, noise, meals, and temperature.
Melatonin is released by the pineal gland about 2 to 3 hours before sleep. Melatonin promotes sleepiness. Something to remember about melatonin though is that if you purchase it at the drugstore, it is not regulated by the FDA. There could be all kinds of additives in it that can harm you as well as the melatonin could not be proper released if at all. Not only that, but melatonin is not the only hormone that is released to promote sleep, so by taking just this one is not likely to actually make you sleepy at all. Plus, there has been no real research done on melatonin, therefore dosage information is unknown. Moral of this story, don’t buy drugs over the counter that are not regulated by the FDA. I am sure it will fuck you up more than you already are.