Production and secretion of melatonin from the pineal gland is dependent on light levels. Light inhibits melatonin production by over-stimulating retinal photoreceptors which blocks release of noradrenaline at the neuronal synapses in the pineal gland. This increases activity of two enzymes found principally in the pineal gland. As such, melatonin production increases soon after the onset of darkness, so that blood levels are at a peak in the middle of the night. Production falls off after about 3am.
Artificial lighting has to be of significant strength and duration to have an effect.
However, the threshold is considered to be that of ordinary fluorescent lighting of 200 to 400 lux. Maximum inhibition occurs after exposure to intense light of 600 lux for one hour. Neonates produce little melatonin, but after three months production increases and the circadian rhythm develops. After this, levels decrease with age. By the age of 80, melatonin levels become barely detectable.