Melatonin secretion is primarily regulated by the circadian rhythm and is influenced by the light-dark cycle, with levels peaking during the night to promote sleep. This hormone, produced by the pineal gland, plays a crucial role in regulating sleep-wake cycles and can be affected by factors such as age, lifestyle, and exposure to artificial light.