Certain enzymes in the pineal gland are activated by darkness, so as the sun goes down melatonin is released and sleep results. As morning approaches and light intensifies, melatonin levels decrease and we awaken after a restful sleep. If adequate levels of melatonin are not produced or are not produced at the proper time, we cannot experience quality sleep. Low melatonin levels are associated with a lessened immune response as well as depression. It is thought that our immune system interacts with melatonin at night.
Many biological functions are rhythmic such as the short rhythms of breathing and heartbeat.
Longer patterns are common, such as monthly menstrual cycles and annual seasonal cycles. By changing the length of time we are exposed to varying intensities of light during a day, it is possible to affect the timing of melatonin production and disrupt our sleep patterns. This can be experienced with jet travel. As we traverse several time zones, our production of melatonin gets out of sync with the new time causing jet lag. Also, if one's job requires them to work different shifts, it can take days to get used to the new time resulting in feeling tired most of the time.