Melatonin is produced in conditions of darkness. When your eyes (retina) see darkness, a collection of cells called the intrinsically photosensitive retinal ganglion cells (ipRGCs)36 is responsible for receiving the signal and sending it to the suprachiasmatic nucleus (SCN), the brain’s timekeeper. It’s the suprachiasmatic nucleus that prompts the pineal gland, a little pea-size gland in the brain, to release melatonin.

