What is Melatonin and How Does it Work?

Lisa BoothDec 08, 2022

Have you ever tossed and turned instead of drifting off to sleep? Melatonin is a hormone responsible for that sleepy feeling that comes on as the sun goes down. It regulates our circadian rhythm, helping us sleep soundly and get the essential rest our brains and bodies require. Let’s talk about what it is, how it works, and how you can naturally balance it.

Importance of sleep

Not only can a lack of rest time make us irritable, it's also harmful for our mental and physical health. Studies show when we don’t get enough good quality sleep, we’re at an increased risk for many diseases and disorders, such as heart disease, stroke, obesity and even dementia (1). Everything from our cells to our immune system uses sleep time to repair and rejuvenate.

Most adults need 7 to 9 hours of sleep to function at their best but according to the Centers for Disease Control (CDC) only 1 in 3 people get this amount per night (4). So how do we turn this lack of sleep nightmare into a dream come true?

Circadian rhythm

Let’s start with how our bodies regulate our sleep pattern through our circadian rhythm. Our suprachiasmatic nucleus (SCN) is located in the bottom part of our hypothalamus. The SCN includes an impressive 20,000 nerve cells which orchestrate our internal clock, also called circadian rhythm. The circadian rhythm controls when it's time to wake, sleep, and eat over a 24-hour period (2).

What is melatonin?

One way the circadian rhythm can be shifted is with melatonin (3). Melatonin is a hormone, produced by our pineal gland, that influences circadian rhythm timing. It typically increases in the evening when it gets dark outside in order to encourage us to fall asleep.

Most of us naturally have enough melatonin, but production can depend on our age, genetics, gender and health habits. We tend to be a sleep starved nation - some reasons include using bright lights or devices at night or traveling into different time zones.

According to a Centers for Disease Control and Prevention survey, about 3 million Americans use melatonin as a sleep aid. Sleep vitamins are on the rise, up to 2.1% in 2017 to 2018 from 0.4% in 1999 to 2000 (5). So, it’s important to know what the best supplements are and how to use them safely.

Melatonin supplements: what the science says

Melatonin in temporary and moderate use is likely safe, but when taken at high doses, there isn’t enough research to make a conclusive claim (6). Since melatonin is a hormone, and because some supplements are not regulated in the US, always check in with your doctor before trying it. They can help point you in the direction of the best supplements for sleeping.

Once you have your doctor’s ok, look for a high quality supplement and try 1 to 5 milligrams 1 to 2 hours before bed (7). Start with a lower dose to see how your body responds. Melatonin can also be improved and produced naturally! One of the safest and healthiest ways to increase melatonin is to get it from the food you eat.

5 melatonin-rich foods

Some of the best vitamins and minerals are found in the foods we eat. Protein-rich foods (meat, poultry, fish, eggs, milk) are associated with better sleep because they contain tryptophan and melatonin. Tryptophan produces serotonin in our bodies, then gets converted into melatonin (8). So when we eat tryptophan-rich foods such as poultry, milk, oats, nuts and seeds, we can support our body in making more melatonin.

Melatonin itself is also found in some plant foods, including nuts, fruits, seeds, cereals, oils, and coffee. Eating more melatonin-rich foods has presented some positive effects when it comes to insomnia (9). So to get a better sleep, incorporate some of these foods with the highest amount of melatonin:

  • Eggs
  • Tart cherries
  • Milk
  • Fish
  • Nuts

There are also certain vitamins and minerals needed to produce or activate melatonin. Some of the best vitamins for sleep and anxiety support include folate, vitamin B6, zinc, and magnesium (3).

  • Folate: dark leafy greens, beans, peanuts, whole grains.
  • Vitamin B6: beef, fish, chickpeas, fortified cereals, potatoes.
  • Zinc: oysters, beans, nuts, whole grains.
  • Magnesium: beans, nuts, seeds, whole grains, dark leafy greens.

Try a melatonin boosting dinner such as fish served on a bed of spinach with brown rice or a snack of yogurt with nuts and tart cherries.

How to naturally increase melatonin

Dim lights at night

Have you ever woken up to bright light or sunshine and felt more energized? That’s because the blue wavelengths have a strong impact on your sleep-wake cycle. When we’re exposed to artificial lights late at night, it can confuse our internal body clock. That’s because melatonin increases with darkness and decreases with light. So a simple but effective way to naturally boost melatonin is to dim your lights at least an hour before bedtime.

Reduce screen time

Back-lit devices, such as smartphones, laptops, tablets, computers and TV reduce or delay our natural production of melatonin in the evening. Studies have shown that these devices can interfere with our sleep and ultimately affect our overall health (10). The blue light can also reduce the total amount of time we spend in rapid-eye movement (REM) sleep, which is vital for our health and cognitive function.

Try turning off all screens at least an hour before bedtime. Instead, swap it for more relaxing activities such as reading a book or taking a hot shower or bath. If you have to be on your device, try putting it on night mode or put on some blue light filtered glasses. As a bonus, you’ll look stylish during your remote meetings.

Get some sun in the morning

There’s nothing quite like catching some sun rays first thing. Getting outside in the morning regulates your circadian rhythm by indicating when to increase and decrease melatonin levels. Research suggests that getting an hour of light in the morning can help you sleep better that evening. The light we get outside on a summer day can be 1000% brighter than we’re exposed to indoors (11). Even 10-15 minutes can make a significant impact.

Consider a light box if you have an indoor job or can’t access good sunlight, such as living in the northern hemisphere during the winter months. These produce light that simulates sunlight. Use one in the morning for about 20-30 minutes to reduce melatonin and increase the happy chemical, serotonin.

Get moving first thing

Exercise has both immediate and delayed effects on how our bodies secrete melatonin. This can depend on the length, intensity, and type of exercise you do. Aerobic exercise in the morning or afternoon stimulates melatonin and can shift your circadian rhythm forward (12). As a bonus, if you exercise outdoors, you also get exposure to sunlight, making it easier to fall asleep earlier.

Exercising in the late evening, especially the high-intensity stuff, can shift the onset of melatonin making it more difficult to go to sleep. For most people, moderate-exercise does not negatively impact sleep as long as it’s an hour and a half before bedtime, but this can be very individual (13).

Bottom line

If you do shift work or travel often and need to regulate your sleep and wake cycle, taking melatonin supplements temporarily can help. There are other natural ways to increase your melatonin such as eating foods that contain it (fish, cherries, nuts, dairy, eggs) or dimming the lights before bed. Remember that every body is different and it's about finding a healthy routine that works best for you!


  1. Wein, Harrison. 2021. “Good Sleep for Good Health.” NIH News in Health. March 29, 2021. https://newsinhealth.nih.gov/2021/04/good-sleep-good-health#:~:text=Good%20sleep%20improves%20your%20brain.
  2. Ma, Melinda A., and Elizabeth H. Morrison. 2020. “Neuroanatomy, Nucleus Suprachiasmatic.” PubMed. Treasure Island (FL): StatPearls Publishing. 2020. https://www.ncbi.nlm.nih.gov/books/NBK546664/#:~:text=The%20suprachiasmatic%20nucleus%20(SCN)%20is.
  3. Peuhkuri, Katri, Nora Sihvola, and Riitta Korpela. 2012. “Dietary Factors and Fluctuating Levels of Melatonin.” Food & Nutrition Research 56 (July). https://doi.org/10.3402/fnr.v56i0.17252.
  4. Centers for Disease Control and Prevention. 2016. “1 in 3 Adults Don’t Get Enough Sleep.” CDC. January 1, 2016. https://www.cdc.gov/media/releases/2016/p0215-enough-sleep.html.
  5. Li, Jingen, Virend K. Somers, Hao Xu, Francisco Lopez-Jimenez, and Naima Covassin. 2022. “Trends in Use of Melatonin Supplements among US Adults, 1999-2018.” JAMA 327 (5): 483–85. https://doi.org/10.1001/jama.2021.23652.
  6. National Center for Complementary and Integrative Health. 2021. “Melatonin: What You Need to Know.” NCCIH. January 2021. https://www.nccih.nih.gov/health/melatonin-what-you-need-to-know.
  7. “Module 6. Improving Your Sleep and Alertness, Sleep Aids and Stimulants, OTC Meds | NIOSH | CDC.” 2021. Www.cdc.gov. July 23, 2021. https://www.cdc.gov/niosh/work-hour-training-for-nurses/longhours/mod6/10.html.
  8. Naseem, Mehar, and Suhel Parvez. 2014. “Role of Melatonin in Traumatic Brain Injury and Spinal Cord Injury.” The Scientific World Journal 2014. https://doi.org/10.1155/2014/586270.
  9. Pereira, Nádia, Maria Fernanda Naufel, Eliane Beraldi Ribeiro, Sergio Tufik, and Helena Hachul. 2019. “Influence of Dietary Sources of Melatonin on Sleep Quality: A Review.” Journal of Food Science 85 (1): 5–13. https://doi.org/10.1111/1750-3841.14952.
  10. Shechter, Ari, Elijah Wookhyun Kim, Marie-Pierre St-Onge, and Andrew J. Westwood. 2018. “Blocking Nocturnal Blue Light for Insomnia: A Randomized Controlled Trial.” Journal of Psychiatric Research 96 (January): 196–202. https://doi.org/10.1016/j.jpsychires.2017.10.015.
  11. Mead, M. Nathaniel. 2008. “Benefits of Sunlight: A Bright Spot for Human Health.” Environmental Health Perspectives 116 (4). https://doi.org/10.1289/ehp.116-a160.
  12. Youngstedt, Shawn D., Jeffrey A. Elliott, and Daniel F. Kripke. 2019. “Human Circadian Phase–Response Curves for Exercise.” The Journal of Physiology 597 (8): 2253–68. https://doi.org/10.1113/jp276943.
  13. Miller, D. J., C. Sargent, G. D. Roach, A. T. Scanlan, G. E. Vincent, and M. Lastella. 2019. “Moderate-Intensity Exercise Performed in the Evening Does Not Impair Sleep in Healthy Males.” European Journal of Sport Science 20 (1): 80–89. https://doi.org/10.1080/17461391.2019.1611934.
Your daily health routine, simplified.
By clicking “accept” or continuing to surf this site’s pages you agree to the Terms of Service and acknowledge that Rootine may collect information that has been provided by you.