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
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
Seeds, hemp seed, hulled
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.
Worth knowing
High in saturated fat with 4.6g per 100g, which is worth watching if you are managing heart health or cholesterol.
Seeds, sesame butter, paste
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.
Worth knowing
High in saturated fat with 7.12g per 100g, which is worth watching if you are managing heart health or cholesterol.
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.
Worth knowing
High in saturated fat with 8.54g per 100g, which is worth watching if you are managing heart health or cholesterol.
Seeds, flaxseed
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.
Worth knowing
Calorie-dense at 534 kcal per 100g, so portion size matters.
Nuts, pistachio nuts, raw
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.
Worth knowing
High in saturated fat with 5.91g per 100g, which is worth watching if you are managing heart health or cholesterol.
Seeds, sunflower seed butter, without salt
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.
Worth knowing
High in saturated fat with 4.68g per 100g, which is worth watching if you are managing heart health or cholesterol.
Nuts, brazilnuts, dried, unblanched
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.
Worth knowing
High in saturated fat with 16.1g per 100g, which is worth watching if you are managing heart health or cholesterol.
Seeds, chia seeds, dried
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.
Worth knowing
Calorie-dense at 486 kcal per 100g, so portion size matters.
Amaranth grain, uncooked
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.
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.
Worth knowing
High in saturated fat with 4.15g per 100g, which is worth watching if you are managing heart health or cholesterol.
Nuts, almonds
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.
Worth knowing
Calorie-dense at 579 kcal per 100g, so portion size matters.
Nuts, butternuts, dried
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.
Worth knowing
Calorie-dense at 612 kcal per 100g, so portion size matters.
Fireweed, leaves, raw
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.
Cheese, American, nonfat or fat free
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.
Worth knowing
High in sodium at 1320mg per 100g, so it may not be the best fit for a low-sodium diet.
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.
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.