When sleep becomes shallow or falling asleep takes too long, people often search for the “right” food: cherries, milk, turkey, or nuts. There is a reasonable question behind this search, but not a simple formula of “eat a food, get melatonin, fall asleep.” Food supplies tryptophan and other nutrients, while some foods contain measurable melatonin. The result also depends on light, sleep timing, the whole diet, and the reason for poor sleep.
The figures below are composition estimates, not therapeutic doses. Melatonin values require particular caution because the same food can produce very different results depending on cultivar, season, storage, cooking, and laboratory method.
Why the body needs melatonin and tryptophan
Melatonin is a hormonal signal of darkness. It helps synchronize the circadian rhythm and the timing of sleep. The pineal gland produces it mainly in the evening and at night as light exposure falls. Its role is not simply to sedate a person, but to tell the body that biological night has begun.
Tryptophan is an essential amino acid. It is required for protein synthesis and participates in several metabolic pathways, including the production of serotonin and melatonin. Not all dietary tryptophan becomes melatonin: it competes with other amino acids for transport, is used for proteins, and can enter the kynurenine pathway. Only a small fraction of available tryptophan enters the brain serotonin pathway.
This is why people look for these compounds in food: not to obtain a tablet from a meal, but to provide building blocks within a generally adequate diet. Detecting melatonin in a food or finding a high tryptophan value does not guarantee a rise in blood melatonin or treatment of insomnia.
Melatonin in foods: what measurements show
Melatonin has been measured in berries, vegetables, mushrooms, seeds, nuts, dairy, fish, and other foods. These results cannot be reduced to one universal ranking. Some values are reported per gram of fresh weight, others per gram of dry weight, and beverages may be reported per milliliter. The table therefore shows reported reference values and the measurement basis, not the exact content of every package in a shop.
| Food | Reported melatonin | Measurement basis | Practical note |
|---|---|---|---|
| Pistachios | up to 233,000 ng/g | dry weight | An outlying value from one study, not a universal value for all pistachios. |
| Mushrooms | about 4,300–12,900 ng/g | dry weight | Values refer to studied species and samples; fresh portions are not equal to dry weight. |
| White and black mustard | about 189 and 129 ng/g | dry weight | Typical spice portions are small and do not provide a drug-like dose. |
| Sweet pepper | about 11.9 ng/g | fresh weight | A low-carbohydrate food, but content varies by cultivar and maturity. |
| Tomatoes | about 14.8–23.9 ng/g | fresh weight | The range refers to different varieties and samples. |
| Tart cherries | about 13.5 ng/g | fresh weight | Studied in small sleep trials; whole fruit and juice are not interchangeable. |
| Strawberries | about 11.3 ng/g | fresh weight | Melatonin content does not cancel carbohydrate content or portion size. |
One study reported a very high melatonin content for pistachios after recalculating the result on a dry-matter basis. This is a laboratory value, not a universal melatonin content for every package of pistachios, so it should not be compared directly with fresh vegetables and berries.
The table also shows why a single ranking would be misleading. A dry-weight pistachio value cannot be directly compared with a fresh tomato value. Food content also does not tell us how much will be absorbed, enter circulation, or affect the nighttime rhythm.
Tryptophan in foods: comparable reference values
Tryptophan is easier to compare in milligrams per 100 g. The approximate values below come from a published food-composition table. They still vary with raw or cooked state, cut, processing, and the individual sample.
| Food | Tryptophan, approximately mg/100 g | Fits strict keto |
|---|---|---|
| Pumpkin seeds | 576 | Yes, while accounting for calories. |
| Cheddar | 574 | Usually, if there is no added sugar or starch. |
| Chicken breast | 404 | Yes. |
| Lamb | 415 | Yes. |
| Pork | 326 | Yes, without sweet sauce or breading. |
| Tuna | 313 | Yes; check the canned product. |
| Salmon | 285 | Yes. |
| Turkey breast | 287 | Yes. |
| Almonds | 209 | Yes, in modest portions. |
| Whole egg | 167 | Yes. |
| Tofu | 235 | Depends on soy tolerance and product composition. |
| Oats | 234 | Usually not for strict keto because of carbohydrates. |
| Buckwheat | 192 | Usually not for strict keto. |
These numbers do not mean that a person should choose the top item or eat 100 g of seeds and cheese before bed. They compare the amino acid in the same mass of food. Real portions, protein, calories, tolerance, and carbohydrates matter more than a ranking position.
Which choices work on a regular diet and on keto?
On a regular diet, dairy, eggs, poultry, fish, nuts, seeds, and berries can all have a place. On strict keto, it is easier to build dinner around eggs, meat, poultry, or fish with non-starchy vegetables. Unsweetened yogurt or cottage cheese may fit when dairy is tolerated, but its carbohydrates still count.
Berries can be used in small portions, while sweet juices and fruit drinks should not be treated as equivalent to whole cherries. They provide less satiety and make a large sugar load easier to consume. Mushrooms, leafy greens, seeds, and nuts can fit keto, but nuts and seeds are energy-dense: increasing the portion does not turn them into a treatment for insomnia.

Why food melatonin does not replace sleep timing
Even when a food contains measurable melatonin, light and meal timing affect sleep. Bright late-evening light may disrupt the biological-night signal more strongly than a small food serving can support it. Food is best viewed as one part of a system, not as a sleeping pill.
Caffeine, alcohol, a late heavy meal, and reflux can worsen nighttime rest. Melatonin in wine does not make alcohol beneficial; alcohol can disturb sleep architecture. Similarly, a tryptophan-containing food may not calm a person when poor sleep is caused by sleep apnea, anxiety, pain, medication, reflux, or a circadian disorder.
How to arrange an evening meal
A practical meal includes a moderate protein portion, non-starchy vegetables, and a suitable amount of fat. Finish dinner with enough time before bed, especially when reflux or heaviness is an issue. There is no need to push tryptophan into gram-level supplement doses without a medical reason: supplement studies cannot automatically be applied to ordinary food.
If sleep problems persist for weeks, occur most nights, or include breathing pauses, marked daytime sleepiness, or low mood, the cause needs attention. Food can support a diet, but it does not replace evaluation or behavioral treatment for insomnia.
Conclusion
Melatonin helps synchronize the circadian rhythm and the nighttime signal, while tryptophan is an essential amino acid and one precursor of serotonin and melatonin. Food melatonin has been measured in nuts, mushrooms, seeds, vegetables, and berries, but the values depend heavily on the measurement basis and method. Among the listed tryptophan values, pumpkin seeds, cheese, poultry, meat, and fish are prominent. For keto, practical choices include eggs, fish, poultry, meat, unsweetened dairy, mushrooms, nuts, and non-starchy vegetables; berries must be counted by carbohydrates. No food replaces darkness, regular timing, or treatment of the cause of insomnia.
Sources
- Dietary Neurotransmitters: A Narrative Review on Current Knowledge
- Dietary Sources and Bioactivities of Melatonin
- Melatonin intake and potential chronobiological effects on human health
- Influence of Dietary Sources of Melatonin on Sleep Quality: A Review
- Sleep and Diet: Mounting Evidence of a Cyclical Relationship
- The Importance of Nutrition in Menopause and Perimenopause — Table of tryptophan content of foods
- Melatonin: What You Need To Know — National Center for Complementary and Integrative Health















