How to Get Natural Melatonin: Foods, Light, and More

Your body produces melatonin every evening on its own, but the amount it makes depends heavily on what you eat, how much light you get (and when), and a few simple habits that either help or hinder the process. Melatonin levels naturally begin rising two to three hours before your usual bedtime, peak in the early morning hours, and drop back down around waking. The goal isn’t to force more melatonin into existence but to remove the obstacles that suppress it and supply your body with the raw materials it needs.

How Your Body Builds Melatonin

Melatonin isn’t made from scratch. Your body assembles it from tryptophan, an essential amino acid you can only get from food. Tryptophan is first converted into serotonin, and then serotonin is converted into melatonin through a chain of four enzymes in the pineal gland, a tiny structure deep in the brain. This two-step relay means that both your tryptophan intake and your serotonin levels directly influence how much melatonin you produce at night.

Sunlight plays a surprisingly important role in the first half of this process. Exposure to bright light during the day triggers serotonin synthesis in the pineal gland. So the chain works roughly like this: eat tryptophan in the morning, get sunlight soon after, and your brain stockpiles serotonin during the day that it can convert into melatonin once darkness falls. Skipping either step, the food or the light, weakens the whole chain.

Foods That Contain Melatonin Directly

A few foods contain ready-made melatonin rather than just its precursors. Tart cherries are the best-studied example. In a clinical trial published in the European Journal of Nutrition, participants who drank 30 milliliters of tart Montmorency cherry juice concentrate twice a day for seven days had significantly elevated melatonin metabolites in their urine compared to both baseline and placebo. Each 30-milliliter serving delivered roughly 43 micrograms of melatonin, for a daily total around 85 micrograms. That’s a fraction of what you’d find in a supplement pill, but it was enough to produce measurable changes in sleep quality.

Pistachios have also gotten attention, though the data is muddier. One 2014 study estimated that a 3.5-ounce serving of shelled pistachios contained about 23 milligrams of melatonin, which would be an enormous dose. A separate analysis by the American Pistachio Growers, using different measurement methods, found the same serving contained only 0.003 to 0.066 milligrams. The discrepancy is large enough that it’s hard to say exactly how much melatonin pistachios deliver, but they likely contribute a meaningful amount. Walnuts contain far less, in the range of nanograms per gram.

Animal products like eggs, fish, and meat contain very little melatonin compared to plant foods. Grains, nuts, and seeds are consistently richer sources.

Eat Tryptophan Early in the Day

Since tryptophan is the starting material for melatonin, eating tryptophan-rich foods gives your body more to work with. Good sources include turkey, chicken, eggs (especially the whites), fish, milk, cheese, pumpkin seeds, sunflower seeds, sesame seeds, peanuts, and soybeans. Most of these are common enough that you’re probably already eating some of them regularly.

Timing matters more than most people realize. Research from the Journal of Circadian Rhythms found that eating a tryptophan-rich breakfast and then getting sunlight exposure shortly afterward enhanced serotonin synthesis during the day, which in turn supported higher melatonin levels at night. The combination of morning protein and morning light appears to be more effective than either one alone. A breakfast that includes eggs, seeds, or dairy paired with a walk outside within the first hour or two of waking is a practical way to set this up.

Get Bright Light During the Day

Morning and midday sunlight does two things for melatonin production. First, it stimulates the serotonin pathway that feeds into melatonin later. Second, it anchors your circadian clock so your brain knows when “day” is and when “night” should begin. Without strong daytime light signals, the whole cycle drifts and melatonin onset can shift later or become weaker.

You don’t need to sunbathe. Spending 20 to 30 minutes outside in natural daylight, even on an overcast day, provides far more light intensity than indoor lighting. The key is consistency: regular morning light exposure trains your internal clock to release melatonin at a predictable time each evening.

Dim Your Lights Before Bed

Light is the single most powerful suppressor of melatonin. The strongest suppression comes from short-wavelength blue light in the 446 to 477 nanometer range, which is exactly the type of light emitted by phone screens, tablets, computer monitors, and LED bulbs. Research from the American Physiological Society confirmed that blue LED light suppresses melatonin in a dose-dependent way: the brighter the light and the longer the exposure, the more melatonin production drops.

Your melatonin levels naturally start climbing two to three hours before your usual bedtime. That window is when your brain is most vulnerable to light interference. Practical steps that make a real difference:

  • Switch to warm, dim lighting in your home during the last two to three hours before bed. Lamps with warm-toned bulbs (lower color temperature) are far less disruptive than overhead white LEDs.
  • Reduce screen brightness or use night mode settings that filter blue wavelengths. Better yet, put screens away an hour before sleep.
  • Keep your bedroom dark. Even small amounts of light from hallways, streetlights, or charging indicators can interfere with melatonin once you’re trying to sleep.

Cool Down Before Sleep

Melatonin release and body temperature are tightly linked. Your core temperature naturally drops in the evening, and research published in the Journal of Applied Physiology confirmed that declines in core body temperature are both temporally and causally connected to rising melatonin concentrations. The cooling happens through a specific mechanism: blood vessels in your skin dilate (especially in your hands and feet), allowing heat to escape from your body’s surface.

You can support this process in a few ways. A warm bath or shower 60 to 90 minutes before bed seems counterintuitive, but it works by drawing blood to the skin’s surface. When you step out, the rapid heat loss triggers the core temperature drop that signals melatonin release. Keeping your bedroom on the cool side, around 65 to 68°F (18 to 20°C), also helps. Wearing socks to bed can promote the kind of distal vasodilation (blood flow to the extremities) that accelerates heat loss from the core.

Why Melatonin Production Drops With Age

If you’re over 40 and feel like your sleep isn’t what it used to be, your melatonin levels are genuinely lower than they once were. Melatonin production peaks between ages one and three, then drops by about 80% over the course of childhood and adolescence. Adults lose an additional 10% or so, primarily during later decades. By age 60 or 70, nighttime melatonin peaks are a fraction of what they were in early life.

This decline is one reason why the lifestyle strategies above become more important as you age. A younger person’s body may produce robust melatonin even with mediocre sleep habits. An older adult may need to be more deliberate about light exposure, tryptophan intake, and evening routines to maintain the same quality of sleep. The mechanisms still work at any age. They just need more support.

Putting It All Together

The most effective approach combines several of these strategies rather than relying on any single one. A realistic daily routine might look like this: eat a protein-rich breakfast that includes tryptophan sources like eggs, seeds, or dairy. Get outside in natural light within the first couple of hours after waking. During the day, spend as much time as you can in bright environments. Two to three hours before bed, lower your home lighting, minimize screens, and let your environment get cooler. Consider adding tart cherry juice, pistachios, or walnuts as an evening snack to provide a small dose of dietary melatonin alongside the melatonin your brain is already producing.

None of these steps requires a supplement, a prescription, or special equipment. They work by aligning your daily habits with the biological systems your body already has in place.