When the sun goes down, your pineal gland switches on like clockwork to secrete melatonin, a hormone that helps you fall asleep and regulates your circadian rhythm. It lowers your core body temperature, which if too high promotes wakefulness. Production of melatonin peaks in the middle of the night, and the process can be disrupted by even very low levels of artificial light.
