GuideApril 8, 2026ยท7 min read

What to Eat for Better Sleep

Sleep quality starts with what you eat. These nutrients and foods can genuinely improve your rest.

Foods ranked for a specific outcome, not generic health halos

Key nutrients explained in plain English

Actionable ways to use the list in real meals

Editorial Transparency/Published April 8, 2026/Updated April 8, 2026

Created By

EatAndAchieve Editorial System

AI-assisted editorial system

This content is assembled from USDA FoodData Central data, in-house ranking logic, and reusable editorial templates to make nutrition information easier to understand.

Reviewed By

Jordan Vale

Founder, editor, and product builder

Jordan reviews pages for clarity, methodology, and product accuracy before they go live. He also maintains the code, data pipeline, and editorial standards for the site.

How This Page Is Made

Pages on EatAndAchieve combine USDA source data, site-specific scoring logic, and AI-assisted drafting, then receive human review for clarity and methodology. They are educational tools, not medical advice. Read more on the About page.

What you eat can significantly impact sleep quality. Magnesium, potassium, and B6 support the biochemical processes behind deep sleep, while tryptophan (from protein) is the precursor to melatonin. Here are the best foods for better rest.

What this guide optimizes for

Foods are ranked for this specific goal, not for generic โ€œhealthiness.โ€ That keeps the list more useful in practice.

How the numbers work

All data comes from USDA FoodData Central and is standardized per 100g so foods can be compared on equal footing.

How to use it

Use the top few foods as anchors, then mix in the rest for variety, cost, and easier meal planning.

How to apply this goal guide

Goal guides are meant to help you build a pattern, not obsess over a single perfect food. The best choices here are foods that repeatedly support the outcome you care about.

Use first

Pick 2 or 3 high-ranking foods you will actually buy every week.

Then balance

Layer in cheaper, easier, or more enjoyable foods from lower down the list to stay consistent.

Watch tradeoffs

Strong foods for one goal can still be salty, fatty, or calorie-dense, so the caution notes matter.

Key Nutrients

Magnesium

Daily Value: 420mg

Activates the parasympathetic nervous system (your 'rest and digest' mode). Regulates melatonin production.

Potassium

Daily Value: 4700mg

Helps relax muscles and prevent nighttime cramps that disrupt sleep.

Vitamin B6

Daily Value: 1.7mg

Required for converting tryptophan to serotonin and melatonin โ€” the brain chemicals that regulate sleep.

Top 15 Foods

Magnesium: 700mg (167% DV)Potassium: 1200mg (26% DV)Vitamin B6: 0.6mg (35% DV)

Seeds, hemp seed, hulled scores near the top because it checks several of the boxes that matter most for sleep. 167% of daily magnesium from 100g is a big reason this food ranks so well.

Serving snapshot: 30 g serving (30g) = 166kcal and 9.5g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

High in saturated fat with 4.6g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 362mg (86% DV)Potassium: 582mg (12% DV)Vitamin B6: 0.8mg (48% DV)

Seeds, sesame butter, paste scores near the top because it checks several of the boxes that matter most for sleep. It supplies 86% of daily magnesium, which is enough to matter without needing a huge portion.

Serving snapshot: 2 tbsp (32g) = 188kcal and 5.8g proteinSource: FDA RACC - FDA RACC for nut and seed butters is 2 tablespoons.

Worth knowing

High in saturated fat with 7.12g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 550mg (131% DV)Potassium: 788mg (17% DV)Vitamin B6: 0.1mg (6% DV)

Seeds, pumpkin and squash seed kernels, roasted, without salt rises to the top tier here because its nutrition profile lines up unusually well with sleep. A 100g serving covers 131% of daily magnesium, which is unusually strong for a single food.

Serving snapshot: 30 g serving (30g) = 172kcal and 8.9g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

High in saturated fat with 8.54g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 392mg (93% DV)Potassium: 813mg (17% DV)Vitamin B6: 0.5mg (28% DV)

Seeds, flaxseed is the kind of food that works well in a real routine for sleep, not just in a spreadsheet ranking. 93% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 30 g serving (30g) = 160kcal and 5.5g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

Calorie-dense at 534 kcal per 100g, so portion size matters.

Magnesium: 121mg (29% DV)Potassium: 1020mg (22% DV)Vitamin B6: 1.7mg (100% DV)

Nuts, pistachio nuts, raw earns this spot because it supports sleep well without needing to be perfect at every metric. A 100g serving covers 100% of daily vitamin b6, which is unusually strong for a single food.

Serving snapshot: 30 g serving (30g) = 168kcal and 6.1g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

High in saturated fat with 5.91g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 311mg (74% DV)Potassium: 576mg (12% DV)Vitamin B6: 0.6mg (32% DV)

Seeds, sunflower seed butter, without salt earns this spot because it supports sleep well without needing to be perfect at every metric. 74% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 2 tbsp (32g) = 197kcal and 5.5g proteinSource: FDA RACC - FDA RACC for nut and seed butters is 2 tablespoons.

Worth knowing

High in saturated fat with 4.68g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 376mg (90% DV)Potassium: 659mg (14% DV)Vitamin B6: 0.1mg (6% DV)

Nuts, brazilnuts, dried, unblanched earns this spot because it supports sleep well without needing to be perfect at every metric. It supplies 90% of daily magnesium, which is enough to matter without needing a huge portion.

Serving snapshot: 30 g serving (30g) = 198kcal and 4.3g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

High in saturated fat with 16.1g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 335mg (80% DV)Potassium: 407mg (9% DV)

Seeds, chia seeds, dried is the kind of food that works well in a real routine for sleep, not just in a spreadsheet ranking. It supplies 80% of daily magnesium, which is enough to matter without needing a huge portion.

Serving snapshot: 30 g serving (30g) = 146kcal and 5.0g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

Calorie-dense at 486 kcal per 100g, so portion size matters.

Magnesium: 248mg (59% DV)Potassium: 508mg (11% DV)Vitamin B6: 0.6mg (35% DV)

Amaranth grain, uncooked rounds out the list as a practical supporting option for sleep. It supplies 59% of daily magnesium, which is enough to matter without needing a huge portion.

Serving snapshot: 1/4 cup (40g) = 148kcal and 5.4g proteinSource: FDA RACC - FDA grain-product fallback based on dry cereal and grain reference amounts.
Magnesium: 279mg (66% DV)Potassium: 748mg (16% DV)Vitamin B6: 0.1mg (6% DV)

Nuts, almond butter, plain, without salt added rounds out the list as a practical supporting option for sleep. 66% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 2 tbsp (32g) = 196kcal and 6.7g proteinSource: FDA RACC - FDA RACC for nut and seed butters is 2 tablespoons.

Worth knowing

High in saturated fat with 4.15g per 100g, which is worth watching if you are managing heart health or cholesterol.

Magnesium: 270mg (64% DV)Potassium: 733mg (16% DV)Vitamin B6: 0.1mg (8% DV)

Nuts, almonds rounds out the list as a practical supporting option for sleep. 64% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 30 g serving (30g) = 174kcal and 6.4g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

Calorie-dense at 579 kcal per 100g, so portion size matters.

Magnesium: 237mg (56% DV)Potassium: 421mg (9% DV)Vitamin B6: 0.6mg (33% DV)

Nuts, butternuts, dried is lower on the page, but it is still a useful rotation food for sleep. 56% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 2 tbsp (32g) = 196kcal and 8.0g proteinSource: FDA RACC - FDA RACC for nut and seed butters is 2 tablespoons.

Worth knowing

Calorie-dense at 612 kcal per 100g, so portion size matters.

Magnesium: 156mg (37% DV)Potassium: 494mg (11% DV)Vitamin B6: 0.6mg (37% DV)

Fireweed, leaves, raw rounds out the list as a practical supporting option for sleep. With 37% of daily magnesium, it helps more than a generic โ€œhealthy foodโ€ usually does.

Serving snapshot: 85 g serving (85g) = 88kcal and 4.0g proteinSource: FDA RACC - FDA RACC for most vegetables without sauce is 85 g.
Magnesium: 115mg (27% DV)Potassium: 393mg (8% DV)Vitamin B6: 0.6mg (33% DV)

Cheese, American, nonfat or fat free rounds out the list as a practical supporting option for sleep. With 33% of daily vitamin b6, it helps more than a generic โ€œhealthy foodโ€ usually does.

Serving snapshot: 1 oz (30g) = 38kcal and 6.3g proteinSource: FDA RACC - FDA RACC for most cheeses is 30 g.

Worth knowing

High in sodium at 1320mg per 100g, so it may not be the best fit for a low-sodium diet.

Magnesium: 209mg (50% DV)Potassium: 758mg (16% DV)Vitamin B6: 0.5mg (29% DV)

Nuts, mixed nuts, dry roasted, with peanuts, salt added, PLANTERS pistachio blend is lower on the page, but it is still a useful rotation food for sleep. 50% of daily magnesium is a meaningful amount for one food to contribute.

Serving snapshot: 30 g serving (30g) = 172kcal and 7.0g proteinSource: FDA RACC - FDA RACC for nuts and seeds is 30 g.

Worth knowing

High in saturated fat with 6.71g per 100g, which is worth watching if you are managing heart health or cholesterol.

Practical Tips

  • โœ“Eating a magnesium-rich dinner (beans, leafy greens, nuts) can improve sleep onset and quality within days.
  • โœ“Tart cherry juice is one of the few foods with measurable melatonin content and is clinically shown to improve sleep duration.
  • โœ“Avoid large meals within 2-3 hours of bedtime, but a small protein-rich snack (Greek yogurt, cottage cheese) can prevent hunger-related wakeups.