top of page

Diet and Sleep

Melatonin is well-known as the hormone to induce sleep; however, multiple factors can impact one’s ability to fall asleep and stay asleep.  Macronutrients consumed in the diet can influence the production or utilization of melatonin. Research suggests that higher protein and higher carbohydrate intake can improve sleep, while higher fat intake has mixed findings. To understand how macronutrients play a role in sleep, a review of how the body makes melatonin is important.


How the body makes melatonin

Melatonin is made from tryptophan through a conversion process that requires many physiological processes. Tryptophan is one of the eight essential amino acids that must be consumed in the diet and is metabolized primarily in the liver (1). It is found in multiple food sources, such as milk, tuna, turkey, chicken, and many nuts and seeds, and is also available as a dietary supplement. Tryptophan is converted sequentially to the aromatic amino acid, 5-hydroxytryptophan (5-HTP), serotonin (5-HT), and melatonin, aiding in both mood regulation and sleep (2–4).  (Figure 1)

Diet and Sleep Figure 1.png

The first step in the conversion process requires adequate protein intake, especially those sources rich in tryptophan. The average dietary intake of tryptophan is about 1% of total protein intake (5). When proteins are consumed, hydrochloric acid (HCl) in the stomach and nutrients including zinc, vitamin B1, and vitamin B6 are required to break down proteins into amino acids, such as tryptophan. Tryptophan is then metabolized in the liver before it enters the body in circulation (1). The majority of tryptophan is bound to albumin, with approximately 1-2% remaining in free-form which is available for serotonin synthesis (6).


Clinical Pearl: Assess for adequate protein/tryptophan intake, HCl sufficiency, and the nutritional co-factors of zinc, vitamin B1, and vitamin B6 and treat accordingly. This can be done through a review of dietary intake, a nutrition-focused physical exam, and select labs.


Next, for the brain to utilize tryptophan, it must cross the blood-brain barrier (BBB). Only the free-form tryptophan can cross the BBB and does so via an insulin transport, making proper insulin handling a critical step in the conversion process. (Figure 2) During this process, tryptophan competes with large neutral amino acids (LNAAs), such as tyrosine, phenylalanine, leucine, isoleucine, valine, and methionine to cross the BBB, which in turn can impact the amount of tryptophan available for serotonin synthesis (6,7).


Clinical Pearl: Assess for glucose and insulin dysregulation and treat accordingly. This can be done by completing glucose and insulin labs.


Then, after tryptophan crosses the BBB, multiple enzymatic processes and micronutrients, including iron, folate, vitamins C, B5 and B6, magnesium, and calcium are needed to further convert 5-HTP to serotonin and serotonin to N-acetyl serotonin before reaching the final step of melatonin production (4,8–11). (Figure 2) Studies have shown that supplemental zinc, zinc-rich foods, and B vitamins improve sleep quality and latency (12).


Clinical Pearl: Assess for nutrient co-factors needs and treat accordingly. This can be done through a review of your dietary intake, a nutrition-focused physical exam, and select labs.

Screenshot 2023-04-24 at 4.11.42 PM.png

Figure 2: Tryptophan Metabolism to Melatonin (13-15)

Macronutrients and Sleep


Knowing that melatonin is produced from tryptophan, it is not a surprise to see that research demonstrates that tryptophan-rich containing foods (i.e., milk) have been shown to improve total sleep time and sleep efficiency, with less difficulty falling asleep, less waking time, and less fragmented sleep (12). Additionally, some studies have shown significantly fewer waking episodes when consuming a higher protein diet (56% of caloric intake) when compared to a controlled balanced diet (16) while an energy-restricted diet that included 20-30% protein (1.5 g/kg/day) had improved sleep quality scores in overweight or obese participants (17).


However, other studies have indicated the opposite, suggesting that a high-protein diet may inhibit the uptake of tryptophan to the brain due to the competing LNAAs, which are naturally consumed in higher proportions than tryptophan as part of our daily protein consumption (6).


While the use of supplemental tryptophan is beyond the scope of this article, many studies demonstrate the effectiveness of using pure tryptophan supplementally for improving sleep latency, ranging from 250 mg-3 grams (18,19). Supplemental tryptophan taken on an empty stomach or with a small amount of carbohydrates does not have to compete with the LNAAs. and therefore is more readily available for the conversion to serotonin and melatonin.


Challenges in relying only on tryptophan in the diet for sleep:

 Dietary tryptophan is degraded through 3 pathways:(1)

  • Serotonin pathway

  • Tryptophan indole pathway

  • Kynurenic pathway


Approximately 95% of dietary tryptophan is degraded through the kynurenic pathway, which is essential for the conversion of tryptophan into nicotinamide adenine dinucleotide (NAD+) for cellular energy (20). The remaining 5% degrades through the serotonin pathway (1,20). (Figure 3) The tryptophan indole pathway is one of the main pathways for tryptophan metabolism in the gut microbiota (21).

The enzymes needed to convert tryptophan to kynurenine are activated by (1):

  • inflammatory cytokines

  • cortisol

Stress (cortisol), inflammatory conditions, or generalized inflammation can ‘push’ tryptophan’s conversation down the kynurenine pathway, taking away from the availability for melatonin production.


Kynurenine is then converted to kynurenic acid, quinolinic acid or picolinic acid. Quinolinic acid is neurotoxic, while kynurenic acid and picolinic acid are potentially neuroprotective (1).

Diet and Sleep Figure 3.png

Figure 3: Tryptophan degradation via the serotonin pathway and kynurenic pathway.

With only 5% of free-from tryptophan available for serotonin synthesis, even a diet rich in tryptophan can present as a serotonin deficiency or insufficiency and therefore have impaired conversation to melatonin.


Psychobiotics, which are probiotics that have an impact on mental health, may help improve tryptophan conversion.  For example, a combination of the probiotic strains B. longum R1075 and L. helveticus R0052 have been shown to significantly decrease the kynurenine/tryptophan ratio, while L. plantarum 286, is hypothesized that it could block kynurenine metabolism. Other psychobiotics such as L. plantarum PS128, L. plantarum 299v, and B. longum 1714 have been shown to decrease cortisol levels and B. breve CCFM1025 demonstrated a significant upregulation in tryptophan and 5-HTP, which, unlike serotonin, can cross the blood-brain barrier and therefore is available to aid in the production of melatonin (22).


Clinical Pearl: Assess for inflammation and cortisol levels, and stress. Not only can one benefit from treating those concerns accordingly, but it may also be helpful to consider probiotics that will support the serotonin pathway to improve melatonin production.


The ingestion of carbohydrates stimulates a glucose and insulin response to occur in the body. As noted earlier, tryptophan requires insulin transport to cross the BBB. In addition, the secretion of insulin promotes the updates of LNAAs to the muscle, making it easier for tryptophan to cross the BBB due to less competition (6).


Animal research dating back to the 1980s found that a meal consisting of higher carbohydrate content assisted in the transport of tryptophan across the blood-brain barrier by eliciting insulin secretion and increasing the tryptophan ratio. The tryptophan ratio indicates the amount of tryptophan available in the brain for conversion to serotonin (23).


More recent studies in humans have examined how a higher carbohydrate diet may influence sleep. One study found that a standard carbohydrate-rich breakfast (69.9 g carbohydrates and 5.2 grams of protein) compared to a high-protein breakfast (15.4 grams of carbohydrates and 46.8 grams protein) increased the tryptophan-LNAA ratio, peaking at 120-240 minutes following the meal, which aided in the transport of tryptophan across the BBB (7). 


Another study compared the effects of a high-glycemic and low-glycemic meal consumed 1 or 4 hours before bed on sleep quality in healthy subjects. There was a significant reduction (48.6%) in sleep onset latency (SOL) in the group that consumed the high-glycemic meal 4 hours before bed, compared to the group that consumed the low-glycemic meal. This was a reduction of 8.5 ± 9.3 minutes. SOL was also significantly decreased (38.3%) in the group that consumed the high glycemic meal 4 hours before bed, compared to the group that consumed the high glycemic meal 1 hour before bed. This reduction was 5.6 ±6.3 minutes. The authors concluded that the timing of the higher glycemic/carbohydrate meal, 4 hours before bed, was more effective on SOL than a meal 1 hour before bed (24).


A study of 24 healthy men, compared a high protein, low carbohydrate (HPLC) diet to a low protein, high carbohydrate (LPHC) diet, consumed as 3 meals per day at set times, adjusting for protein needs accordingly to basal metabolic rate and fat intake was consistent between the two groups. Caffeine, alcohol, and foods containing melatonin were not consumed. Saliva testing was used to measure melatonin and sleep was measured using polysomnography. Better sleep quality was observed after following the LPHC diet for 3 days, with a small, but significant increase in melatonin secretion (6).


Other studies have also demonstrated that a meal higher in carbohydrates can induce improvements in sleep onset (5,16), have significantly shorter wake times (25), or significant improvements in the first stage of sleep (26) however, the timing of this meal varies from morning to evening meal for effectiveness.


In general, the consumption of higher carbohydrates appears to be most 

impactful on sleep when consumed 2-4 hours before bedtime,

though may only modify sleep by approximately 10 minutes

in healthy individuals (12,19).


Clinical Pearl: A challenge with a high carbohydrate diet or meal is that insulin levels also increased significantly, whereas a high protein diet or meal did not have this impact (6,7). Caution should be used for those who have poor insulin regulation such as those with pre-diabetes, type I, or type II diabetes. 


High Fats

The research on dietary fats' impact on sleep is limited and has mixed findings. One study has shown that adolescents who sleep more than 8 hours were consuming higher fats, in proportion to their overall caloric intake, while another study showed decreased sleep quality with increased fat intake (25).  Another reported no significant difference in sleep parameters when consuming a high-fat diet (16) nor differences in sleep stages (26).


The same group of researchers who noted that a high-carbohydrate diet improved SOL,(24) also found that a very-low-carbohydrate diet (Atkins diet) significantly decreased sleep latency (27). Research on the ketogenic diet in obese adults and adolescents found improved sleep quality as fat mass was lost (28,29).

It has been reported that a high-fat diet is associated with daytime sleepiness in obese individuals with obstructive sleep apnea (OSA) despite using a CPAP machine (30). Of note, in animal studies, the circadian cycle was increased with a high-fat diet suggesting the potential for this dietary pattern to assist in nighttime sleep (30).


Whole-Food Plant-Based Diet

Rather than focusing on macronutrients, researchers from the Mayo Clinic conducted a pilot study to explore the use of the whole-food plant-based (WFPB) diet. Fourteen individuals with OSA, who consumed a Western diet, were provided a WFPB food plan (Forks Over Knives handbook) to assess the impact this plan would have on daytime sleepiness. It is suggested that plant-based proteins rich in tryptophan may increase melatonin levels to aid in improving nighttime sleep patterns, decreasing daytime sleepiness. After 21 days, with a 90% compliance rate with the food plan, 78.5% of the participants reported decreased daytime sleepiness. Further, there was a significant mean reduction in body weight of 3.6 kg (p=0.001) (31).

Should you eat something before bed to increase melatonin production?

Studies have shown how protein, carbohydrates, and fat can have various levels of improvement in sleep. However, the studies have primarily explored how overall dietary patterns and foods that are consumed throughout the day have an impact rather than a focus on any macronutrient right before bed.


Individuals that wake during the night due to hypoglycemia will benefit from having a small snack before bed to help stabilize blood glucose during sleep. While people with GERD generally want to avoid the consumption of food prior to sleep to reduce symptoms. For those taking melatonin supplementation before bed, having a small snack that contains fat (e.g., 1/2 TBSP. of almond butter) may improve the absorption and utilization of the supplement, as melatonin is both fat-soluble and water-soluble.


It is well accepted that avoiding food approximately 3 hours before bedtime allows adequate time for proper digestion to occur, decreasing any potential digestive discomfort and avoiding interference with the circadian rhythm.


In Summary

There is not “one size fits all” diet for improving sleep. Rather, there are many considerations and personalized recommendations to consider. The consumption of higher protein, higher carbohydrate, and higher fat diets have been shown to be beneficial, working in different mechanistic ways. Saidi, et al, state, “…the existing evidence, does not allow to draw a consensus about the potential effects of protein or carbohydrates on sleep.”(6)

Additionally, aside from the influence of macronutrients and the nutrient co-factors, chrononutrition, caffeine and alcohol intake, and lifestyle factors that impact the circadian rhythm cannot be ignored for optimizing sleep.


It is best to assess your patient's personalized needs for macronutrients and the nutritional co-factors needed to produce melatonin, while also considering proper glucose and insulin regulation. In addition, utilizing phytomelatonin supplementation, when indicated, will bypass the conversion process of tryptophan to melatonin.


Written by Kim Ross, DCN

Reviewed by Deanna Minich, PhD

Last Updated July 20, 2023




1.        Chen LM, Bao CH, Wu Y, Liang SH, Wang D, Wu LY, et al. Tryptophan-kynurenine metabolism: a link between the gut and brain for depression in inflammatory bowel disease. Vol. 18, Journal of Neuroinflammation. 2021.

2.        Lindseth G, Helland B, Caspers J. The effects of dietary tryptophan on affective disorders. Arch Psychiatr Nurs. 2015;

3.        Friedman M. Analysis, Nutrition, and Health Benefits of Tryptophan. International Journal of Tryptophan Research. 2018.

4.        Lakhan SE, Vieira KF. Nutritional therapies for mental disorders. Nutrition Journal. 2008.

5.        Lyons PM, Truswell AS. Serotonin precursor influenced by type of carbohydrate meal in healthy adults. American Journal of Clinical Nutrition. 1988;47(3).

6.        Saidi O, Rochette E, Del Sordo G, Peyrel P, Salles J, Doré E, et al. Isocaloric Diets with Different Protein-Carbohydrate Ratios: The Effect on Sleep, Melatonin Secretion and Subsequent Nutritional Response in Healthy Young Men. Nutrients. 2022;14(24).

7.        Wurtman RJ, Wurtman JJ, Regan MM, McDermott JM, Tsay RH, Breu JJ. Effects of normal meals rich in carbohydrates or proteins on plasma tryptophan and tyrosine ratios. American Journal of Clinical Nutrition. 2003;77(1).

8.        Sathyanarayana Rao T, Asha M, Ramesh B, Jagannatha Rao K. Understanding nutrition, depression and mental illnesses. Indian J Psychiatry. 2008;

9.        BERNSTEIN AL. Vitamin B6 in Clinical Neurology. Ann N Y Acad Sci. 1990;

10.      Eby GA, Eby KL. Rapid recovery from major depression using magnesium treatment. Med Hypotheses. 2006;

11.      Ranjbar E, Kasaei MS, Mohammad-Shirazi M, Nasrollahzadeh J, Rashidkhani B, Shams J, et al. Effects of Zinc supplementation in patients with major depression: A randomized clinical trial. Iran J Psychiatry. 2013;

12.      Binks H, Vincent GE, Gupta C, Irwin C, Khalesi S. Effects of diet on sleep: A narrative review. Vol. 12, Nutrients. 2020.

13.      Bauer KC, Huus KE, Finlay BB. Microbes and the mind: Emerging hallmarks of the gut microbiota-brain axis. Cellular Microbiology. 2016.

14.      Sherwin E, Sandhu K V., Dinan TG, Cryan JF. May the Force Be With You: The Light and Dark Sides of the Microbiota–Gut–Brain Axis in Neuropsychiatry. CNS Drugs. 2016;

15.      Zhao D, Yu Y, Shen Y, Liu Q, Zhao Z, Sharma R, et al. Melatonin synthesis and function: Evolutionary history in animals and plants. Vol. 10, Frontiers in Endocrinology. 2019.

16.      Lindseth G, Lindseth P, Thompson M. Nutritional Effects on Sleep. West J Nurs Res. 2013;35(4).

17.      Zhou J, Kim JE, Armstrong CLH, Chen N, Campbell WW. Higher-protein diets improve indexes of sleep in energy-restricted overweight and obese adults: Results from 2 randomized controlled trials. American Journal of Clinical Nutrition. 2016;103(3).

18.      Hartmann E. Effects of L-tryptophan on sleepiness and on sleep. J Psychiatr Res. 1982;17(2).

19.      Peuhkuri K, Sihvola N, Korpela R. Diet promotes sleep duration and quality. Vol. 32, Nutrition Research. 2012.

20.      Minich DM, Henning M, Darley C, Fahoum M, Schuler CB, Frame J. Is Melatonin the “Next Vitamin D”?: A Review of Emerging Science, Clinical Uses, Safety, and Dietary Supplements. Nutrients [Internet]. 2022;14(19). Available from:

21.      Zhang X, Gan M, Li J, Li H, Su M, Tan D, et al. Endogenous indole pyruvate pathway for tryptophan metabolism mediated by IL4I1. J Agric Food Chem. 2020;68(39).

22.      Ross K. Psychobiotics: Are they the future intervention for managing depression and anxiety? A literature review. Explore. 2023.

23.      Yokogoshi H, Wurtman RJ. Meal composition and plasma amino acid ratios: Effect of various proteins or carbohydrates, and of various protein concentrations. Metabolism. 1986;35(9).

24.      Afaghi A, O’Connor H, Chow CM. High-glycemic-index carbohydrate meals shorten sleep onset. American Journal of Clinical Nutrition. 2007;85(2).

25.      Lindseth G, Murray A. Dietary Macronutrients and Sleep. West J Nurs Res. 2016;38(8).

26.      Yajima K, Seya T, Iwayama K, Hibi M, Hari S, Nakashima Y, et al. Effects of nutrient composition of dinner on sleep architecture and energy metabolism during sleep. J Nutr Sci Vitaminol (Tokyo). 2014;60(2).

27.      Afaghi A, O’Connor H, Chow CM. Acute effects of the very low carbohydrate diet on sleep indices. Nutr Neurosci. 2008;11(4).

28.      Castro AI, Gomez-Arbelaez D, Crujeiras AB, Granero R, Aguera Z, Jimenez-Murcia S, et al. Effect of a very low-calorie ketogenic diet on food and alcohol cravings, physical and sexual activity, sleep disturbances, and quality of life in obese patients. Nutrients. 2018;10(10).

29.      Willi SM, Oexmann MJ, Wright NM, Collop NA, Key LL. The effects of a high-protein, low-fat, ketogenic diet on adolescents with morbid obesity: Body composition, blood chemistries, and sleep abnormalities. Pediatrics. 1998;101(1 I).

30.      Panossian LA, Veasey SC. Daytime Sleepiness in Obesity: Mechanisms Beyond Obstructive Sleep Apnea—A Review. Sleep. 2012 May;35(5):605–15.

31.      Patel K, Lawson M, Cheung J. Whole-food plant-based diet reduces daytime sleepiness in patients with OSA. Sleep Med. 2023 Jul;107:327–9.

bottom of page