Magnesium
Essential mineral for 300+ enzymatic reactions, sleep quality, muscle function, and stress resilience
Bottom Line
Magnesium is one of the most important and commonly deficient minerals. Up to 50% of Americans don't get enough from diet alone. Supplementation reliably improves sleep quality, reduces muscle cramps, supports recovery, and may help with anxiety and stress.
One of the safest, most well-researched supplements. If you're not optimizing your diet for magnesium, supplementation is a smart baseline intervention.
Science
Mechanisms:
- Cofactor in 300+ enzymatic reactions
- Regulates GABA receptors (calming neurotransmitter)
- Essential for ATP production and energy metabolism
- Modulates NMDA receptors (neuroprotection)
- Required for muscle contraction and relaxation
- Supports healthy blood pressure regulation
Key studies:
- Abbasi et al. (2012): 500mg magnesium improved sleep quality, sleep time, and melatonin in elderly
- Boyle et al. (2017): Systematic review supporting magnesium for subjective anxiety
- Li et al. (2017): Higher magnesium intake associated with lower depression risk
Effect sizes:
- Sleep quality: Moderate (especially if deficient)
- Anxiety reduction: Small to moderate
- Muscle cramps: Moderate to large
- Exercise recovery: Small to moderate
Limitations:
- Effects most pronounced in those who are deficient
- Different forms have different bioavailability
- Takes 1-4 weeks for full effect
Supporting Studies
9 peer-reviewed studies
View all studies & compare research →Practical Protocol
General supplementation:
- Dose: 200-400mg elemental magnesium daily
- Timing: Evening for sleep benefits, or split AM/PM
- Take with food to improve absorption and reduce GI upset
For sleep:
- 200-400mg magnesium glycinate or threonate
- Take 30-60 minutes before bed
- Combine with glycine for enhanced effect
For exercise/recovery:
- 200-400mg after training
- Magnesium citrate or malate preferred
- Can stack with creatine and electrolytes
For anxiety/stress:
- 200-400mg magnesium glycinate
- Split into 2 doses (morning and evening)
- Magnesium L-threonate may have additional cognitive benefits
Form selection:
| Form | Best For | Notes |
|---|---|---|
| Glycinate | Sleep, anxiety | Highly bioavailable, gentle on stomach |
| L-Threonate | Cognition, brain | Crosses blood-brain barrier |
| Citrate | General, constipation | Good absorption, mild laxative |
| Malate | Energy, muscle | May support ATP production |
| Taurate | Heart health | Combines with taurine |
| Oxide | Budget | Poor absorption, mostly laxative |
Common mistakes:
- Taking too much at once (causes GI issues)
- Using oxide form expecting absorption
- Not accounting for dietary magnesium
Risks & Side Effects
Known risks:
- GI upset (especially citrate at high doses)
- Diarrhea if dose too high
- Drowsiness (when used for sleep)
Contraindications:
- Kidney disease (impaired clearance)
- Heart block
- Myasthenia gravis
- Taking certain antibiotics (separate by 2+ hours)
Interactions:
- May enhance sedative effects of sleep aids
- Separate from bisphosphonates and certain antibiotics
- Can affect absorption of some medications
Upper limit:
- 350mg/day supplemental (IOM recommendation)
- Higher doses may be fine short-term but monitor for loose stools
Who It's For
Ideal for:
- Those with poor sleep quality
- People with muscle cramps or tension
- Athletes and active individuals
- Anyone under chronic stress
- Those with low dietary magnesium intake
- Coffee and alcohol consumers (depletes magnesium)
Should be careful:
- Kidney disease patients (consult doctor)
- Those on medications that interact
- People with low blood pressure
Signs you may be deficient:
- Muscle cramps or twitches
- Poor sleep quality
- Anxiety or irritability
- Fatigue
- Headaches
How to Track Results
What to measure:
- Sleep quality (subjective 1-10 scale)
- Time to fall asleep
- Muscle cramps frequency
- Stress/anxiety levels
- Energy levels
Blood testing:
- Serum magnesium (limited value - most is intracellular)
- RBC magnesium (better indicator)
- Most accurate: symptom improvement
Timeline:
- Sleep effects: 1-2 weeks
- Muscle cramp reduction: 1-2 weeks
- Full tissue saturation: 4-6 weeks
Signs it's working:
- Falling asleep faster
- Fewer nighttime awakenings
- Reduced muscle tension
- Better stress resilience
- Fewer cramps during exercise
Top Products
Top recommendations:
- Thorne Magnesium Bisglycinate - Excellent quality glycinate
- Life Extension Magnesium L-Threonate - Best for cognitive benefits
- Pure Encapsulations Magnesium Glycinate - Clean formulation
- NOW Magnesium Citrate - Good budget option
For sleep specifically:
- Magtein (Magnesium L-Threonate)
- Natural Vitality Calm - Popular powder form
What to look for:
- Third-party tested (NSF, USP, Informed Sport)
- Chelated forms (glycinate, citrate, malate)
- Elemental magnesium content listed
- No unnecessary fillers
What to avoid:
- Magnesium oxide (poor absorption)
- Proprietary blends without amounts
- Products with artificial colors
Cost Breakdown
Budget ($10-15/month):
- NOW Magnesium Citrate: ~$10/month
- Generic magnesium glycinate: ~$12/month
Mid-range ($15-30/month):
- Thorne Magnesium Bisglycinate: ~$20/month
- Pure Encapsulations: ~$25/month
Premium ($30-50/month):
- Life Extension Neuro-Mag (L-Threonate): ~$40/month
- Stacking multiple forms: ~$35-50/month
Cost-per-benefit assessment:
Excellent value. Even premium forms are affordable relative to benefits. Glycinate offers best balance of quality and cost.
Recommended Reading
Podcasts
Sleep Toolkit - Tools for Optimizing Sleep & Sleep-Wake Timing
Get morning sunlight within 30-60 minutes of waking, keep your bedroom at 65-68F, and maintain a...
Essentials: Micronutrients for Health & Longevity | Dr. Rhonda Patrick
Four micronutrients move the needle most for longevity: sulforaphane (from broccoli sprouts or...
Essentials: Breathing for Mental & Physical Health & Performance | Dr. Jack Feldman
Slow, controlled breathing directly reduces anxiety by activating specific neural pathways -...
Protect & Improve Your Hearing & Brain Health | Dr. Konstantina Stankovic
Hearing loss significantly increases dementia risk, but simple protocols can protect you. Take...
Discussed in Podcasts
79 curated moments from top health podcasts. Click any timestamp to play.
Magnesium Discussion
That's why you have to make sure you put a check in front of all these underlying conditions. I'd like to take a quick break and acknowledge one of our sponsors, Element.
"Element is an electrolyte drink that has everything you need and nothing you don't. That means the electrolytes, sodium, magnesium, and potassium, all in the correct ratios, but no Proper hydration is critical for brain and body function."
Magnesium: Benefits
Welcome to Huberman Lab Essentials, where we revisit past episodes for the most potent and actionable science-based tools for mental health, physical health, and performance.
"Welcome to Huberman Lab Essentials, where we revisit past episodes for the most potent and actionable science-based tools for mental health, physical health, and performance."
Magnesium Discussion
There's always a temptation as one learns about the symptomology of a given disorder, it doesn't really matter what the disorder is, to ask the question, well, do I have that?
"Welcome to Huberman Lab Essentials, where we revisit past episodes for the most potent and actionable science-based tools for mental health, physical health, and performance. I'm Andrew Huberman, and I'm a professor of neurobiology and ophthalmology at Stanford School of Medicine. Today, we are going to talk all about healthy and disordered eating. And indeed, we are going to talk about clinical eating disorders, such as anorexia, bulimia, and binge eating disorder, as well as some other related eating disorders. However, before we get into this material, I want to emphasize that today's discussion will include what it is to have a healthy relationship with food. We're going to talk about metabolism. We're going to talk about how eating frequency and what one eats influences things like appetite and satiety, as well as whether or not we have a healthy psychological relationship to food and our body weight and so-called body composition, the ratio of muscle to fat to bone, et cetera. So as we march into this conversation, I'd like to share with you some interesting and what I believe are important findings in the realm of nutrition and human behavior. I know these days, many people are excited about or curious about so-called intermittent fasting. Intermittent fasting is, as the name implies, simply restricting one's feeding behavior, eating, to a particular phase of the 24-hour, or so-called circadian cycle. Other forms of intermittent fasting involve not eating for extended periods of time, for entire days, or some people will extend to two days or three days. Typically, and hopefully, they will drink water during those times, sometimes referred to as water fasting, which means that they are ingesting fluids, and hopefully they are ingesting electrolytes such as salt, potassium, and magnesium as well, because while one can survive for some period of time without ingesting calories, it is extremely important to continue to ingest plenty of fluids and electrolytes. And the reason for that is that the neurons of your brain and body that control your movements, your thoughts, clarity of thinking in general, et cetera, is critically dependent on the presence of adequate levels of sodium, potassium, and magnesium, the electrolytes. And that's because neurons can only be electrically active by way of movement of particular ions, which include things like sodium, potassium, and magnesium. So without those, you can't think, you can't function, and it actually can be quite dangerous. So why all the excitement about intermittent fasting? Well, a lot of the excitement relates to work that was done by a former colleague of mine down at the Salk Institute for Biological Studies in San Diego named Sachin Panda. Sachin's lab identified some very important and impactful health benefits of restricting one's feeding window to particular times within the 24 hour cycle, or even to having extended fasts that go for a day or two days, or maybe even three days. What they saw was an improvement in liver enzymes, an improvement in insulin sensitivity, which is something that is good. It means that you can utilize the calories and the blood sugar that you happen to have. Being insulin insensitive is not good and is actually a form of diabetes. What Sachin's lab and subsequently other labs showed was that restricting one's feeding window to anywhere from four to eight or even 12 hours during each 24 hour cycle was beneficial in mice. And some studies in humans have also shown that it can be beneficial for various health parameters. However, the excitement about intermittent fasting seems to be related to the foundational truth about metabolism and weight loss and weight maintenance and weight gain, which is that regardless of whether or not you intermittent fast or whether or not you eat small meals all day long, or you eat one meal in the evening and snack up until then, it really doesn't matter in the sense that the calories that you ingest from whatever source are going to be filtered through the calories that you burn by way of exercise, basal metabolic rate, which is just the calories that you happen to burn, just being alive and thinking and breathing and your heart beating, et cetera. And the reason why many people prefer intermittent fasting to other forms of, let's just call it what it is, diet or nutritional framework, is that many people find it easier to not eat than to limit their portion size. And here I'm not talking necessarily about eating disorders, I'm talking about the general population. So why are we talking about this? And in particular, why are we talking about this during an episode that includes a discussion about eating disorders? The reason is nobody, not the government, no nutritionists, no individual, no matter how knowledgeable they are about food and nutrition and food intake can define the best plan for eating for any one individual. I'm going to repeat that. Nobody knows what truly healthy eating is. We only know the measurements we can take. Liver enzymes, blood lipid profiles, body weight, athletic performance, mental performance, whether or not you're cranky all day, whether or not you're feeling relaxed. Nobody knows how to define these. And these have strong cultural and familial and socio-societal influence. So if you hang out with people that intermittent fast all day, that will seem normal. If you spend time with people that have never heard of intermittent fasting, intermittent fasting is going to seem very abnormal. Now we are going to talk about eating disorders that really fall into the category of clinically diagnosable eating disorders for which there's actually serious health hazards and even the serious risk of death. There are clear criteria in the psychiatric and psychological communities to define things like anorexia, bulimia, binge eating disorder, all of which we will talk about. But as we have that discussion, I want to emphasize that self-diagnosis can be both a terrific, but also a very precarious thing. There's always a temptation as one learns about the symptomology of a given disorder, it doesn't really matter what the disorder is, to ask the question, well, do I have that? Does so-and-so that I know have that? It's tempting to diagnose them and or ourselves as either having or not having a particular disorder. However, diagnoses really need to be carried out by people who are trained in that particular field and that have deep expertise in recognizing the symptomology, including some of the more subtle symptomology of eating disorders. So if any of the symptoms resonate with you by way of you thinking that you have this particular disorder or someone that you know has a disorder, I would take that seriously, but I would take that information to a qualified healthcare professional that could diagnose or rule out any of these possible disorders. I'd like to take a quick break and acknowledge one of our sponsors, Element. Element is an electrolyte drink that has everything you need and nothing you don't. That means the electrolytes, sodium, magnesium, and potassium in the correct amounts, but no sugar. Proper hydration is critical for optimal brain and body function. Even a slight degree of dehydration can diminish cognitive and physical performance. It's also important that you get adequate electrolytes. The electrolytes, sodium, magnesium, and potassium, are vital for functioning of all the cells in your body, especially your neurons or your nerve cells. Drinking element dissolved in water makes it very easy to ensure that you're getting adequate hydration and adequate electrolytes. To make sure that I'm getting proper amounts of hydration and electrolytes, I dissolve one packet of element in about 16 to 32 ounces of water when I first wake up in the morning, and I drink that basically first thing in the morning. I'll also drink Element dissolved in water during any kind of physical exercise that I'm doing, especially on hot days when I'm sweating a lot and losing water and electrolytes. Element has a bunch of great tasting flavors. I love the raspberry. I love the citrus flavor. Right now, Element has a limited edition lemonade flavor that is absolutely delicious. I hate to say that I love one more than all the others, but this lemonade flavor is right up there with my favorite other one, which is raspberry or watermelon. Again, I can't pick just one flavor. I love them all. If you'd like to try Element, you can go to drinkelement.com slash Huberman, spelled drinkelement.com slash Huberman to claim a free Element sample pack with a purchase of any element drink mix. Again, that's drinklmnt.com slash Huberman to claim a free sample pack. So what is an eating disorder? Well, we have to take a step back and confess to the fact that every society, every culture, every family, and every individual has a different relationship to food. Eating disorders, however, have particular criteria that allow us to define them and to think about different modes of treatment as it relates to the particular symptoms, in particular, the psychological and biological symptoms of those disorders. What are the major eating disorders? Anorexia nervosa, most commonly referred to as anorexia, is perhaps the most prevalent and the most dangerous of all eating disorders. In fact, anorexia is the most dangerous psychiatric disorder of all, even more than depression. The probability of death for untreated anorexia is very high. And sadly, the prevalence of anorexia is very high. If you look it up online or you talk to a qualified professional, is essentially a failure to eat enough to maintain a healthy weight. You can see all sorts of very troubling symptoms of somebody who's been anorexic for some period of time, a general loss of muscle mass because they're ingesting fewer calories than they burn. They will have a low heart rate. This is the body and brain's attempt to lower energy output. They will have low blood pressure. They'll sometimes have symptoms like fainting, loss of bone density, osteoporosis, loss of periods in girls and women, and all sorts of disrupted gut and immune functions. So there are just tons of terrible symptoms of anorexia that really place the anorexic into a very risky state, which is why mortality from anorexia gone untreated is extremely high. Now, one of the misconceptions about anorexia is that it stems from an overemphasis on perfectionism, or that because of all the images in social media and in advertising of extremely thin and fit or muscular people, that individuals are looking at themselves and comparing themselves to those images and thinking that they don't match up and developing anorexia. That turns out to not be the case. If you look at the prevalence or the rates of anorexia in the last 10 years or 20 years, and you compare that to when anorexia was first identified, which was in the 1600s and perhaps even earlier, what you find is that rates of anorexia are not going up. Classically defined anorexia has existed at essentially the same prevalence for the last 100, 200, 300, and 400 years, which is incredible and really speaks to the likelihood that there's a strong biological contribution to what we call anorexia nervosa. Anorexia nervosa is extremely common. It's anywhere from one to 2% of women. And the typical onset is in adolescence, close to puberty, but it can show up later in life as well. In fact, the identification and diagnosis of anorexia tends to be in the early 20s. But if you look back at the history of those individuals, there were typically signs of anorexia that stem back into their early teens, or maybe even before that. Now, of course, men can be anorexic as well, but anorexia nervosa does seem to occur at 10 times the rate in women and young girls than it does in men and young boys. So what is hunger and what is satiety? Satiety, of course, being sated or feeling like we've had enough food. I want to remind people of the basic mechanisms by which the brain and body communicate. The body is communicating two types of information to the brain on a regular basis, but in particular around feeding. And those two types of information are mechanical information and chemical information. When your stomach is full, it sends signals to your brain that are purely based on this mechanical fullness. That's nothing to do with nutrients that says I'm full. And therefore don't be as hungry. Don't motivate to find or ingest food. Whereas when our gut is empty, even if we have plenty of nutrients or plenty of body fat stores, we tend to focus on food a bit more. So volume and mechanical influences have a profound effect on how we think and what we consider doing or not doing. Likewise, chemical effects. When we ingest food, our blood glucose goes up. That information is signaled to the brain via neuronal pathways and hormonal pathways. And in particular, there are neurons within our gut that signal to areas of our brainstem that are involved in satiety in our sense of having enough that there's food in our system. So that's chemical information. So how are hunger and feeding and satiety regulated? By way of mechanical and chemical signaling. You have, I have, we all have neurons in our hypothalamus that trigger eating and neurons that trigger cessation or stopping of eating. Your hypothalamus at the base of your forebrain sits more or less above the roof of your mouth. The hypothalamus contains lots of different kinds of neurons, including neurons that stimulate sexual activity and desire, regulate your body temperature and control appetite and ceasing of eating an appetite. There are two types of neurons within a particular area of your hypothalamus that are relevant here. There are the so-called POMC neurons, okay? Pro-opioid melanocortin neurons that tend to act as more of a break on appetite by way of another hormone called melanocyte stimulating hormone. And you have a class of neurons called the AGRP neurons. The AGRP neurons are the ones that stimulate feeding and they create a sort of anxiety or excitement about food. If you eliminate or kill these neurons, which has been done in experimental mouse models in the laboratory, but also there are humans that have lesions or neurotoxic effects on these AGRP neurons. And what you find is that they don't want to eat. They have no appetite for food whatsoever. Whereas if you stimulate these AGRP neurons, or in humans that have, say, a small tumor near these AGRP neurons, they become hyperphagic. They will eat to the point of bursting. Now, there are signals coming back from the body to inform the brain about presence of different levels of nutrients. And that generally comes from three sources. First of all, is body fat. The more body fat we have, the more we secrete a hormone called leptin, L-E-P-T-I-N, leptin from body fat. Leptin goes to the brain and suppresses appetite. Not incidentally, leptin signaling is disrupted in people that have bulimia and obesity and certain forms of binge eating disorder. The body fat is doing something else really interesting that relates to anorexia. When there's sufficient levels of body fat and leptin circulating in the blood, and that leptin signal gets to the brain, the hypothalamus and the pituitary gland register that signal, and in a completely subconscious way, trigger the deployment of eggs in females and the production of sperm in males. So when body fat stores are very low, the reason why periods shut off or sperm production is reduced or even shut off is because there's not enough leptin getting to the hypothalamus and to the pituitary, and they shut off the signals, the hormones, things like gonadotropin, releasing hormone, luteinizing hormone, follicle stimulating hormone, that travel to the ovary or to the testes and cause the ovary and testes to ovulate or to produce more sperm. So you've got two categories of neurons, one that acts as an accelerator, the AGRP neuron saying eat, eat, and gets you excited to eat. And then you have a category of neurons, the PMOC neurons that are suppressing hunger. They're acting like a brake. And the body is informing the brain all the time about the status of the body and whether or not it needs more food. So you might ask, why is it that people who are overweight and have a lot of body fat, why they would continue to eat a lot? It seems like that just shouldn't happen. From an evolutionary standpoint, it makes sense that we should eat as often as we can, as much as we can, and as fast as we can. There are circuits in the brain to reward eating often, eating fast, and cramming as much food into you as possible because from a purely evolutionary standpoint, food was scarce and seeking food was dangerous, whether or not it was from animal sources or not. And it's always been competitive. Every animal, including humans, has a hardwired circuit that we were born with that pays attention to how much food is available, how much we are getting now, and how much we are likely to get in the future. And without going down the rabbit hole of arcuate nucleus biology, in two sentences, you have a hypothalamic area called the arcuate nucleus. It's actually the area that houses these PMOC neurons and these other types of neurons that regulate hunger and satiety. And these neurons in the arcuate nucleus start getting active when we see food and think about food and they drive hunger in a way that's responsive to what the food looks like, what it smells like, but also our prior history of interactions with that food. And it takes into account social context. What's the pathway? How does this work? Well, you can frame all of behavior, good decision-making and bad decision-making in a pretty simple box diagram model."
Magnesium is involved in over 600 reactions in the body
Dr. Galpin explains that magnesium is involved in well over 600 reactions including cell signaling, ATP production, protein synthesis, neuroplasticity, and memory. Deficiency is associated with type 2 diabetes, metabolic syndrome, hypertension, and headaches.
"magnesium oh my goodness could I go on and on and on about the physiological benefits of magnesium it is involved in well over 600 reactions in your body from cell signaling vascular function ATP production protein synthesis uh neuroplasticity learning memory"
Magnesium drops near neurons after brain injury correlates with severity
There is a well-documented drop in magnesium near central neurons after TBI, and the extent of that drop correlates with injury severity and behavioral disturbances. One study found 400mg of magnesium twice per day reduced post-concussion severity scores within 48 hours.
"there's a well documented drop in magnesium especially near Central neurons after a TBI and the extent of that drop is associated with the severity of the injury and the level of Behavioral disturbances"
Magnesium forms and practical dosing guidance
Galpin notes there is no compelling evidence that any magnesium form (threonate, bisglycinate, malate) is better than another. He takes magnesium at night since most people find it helps with sleep, and notes pumpkin seeds are the highest food source at about 200mg per 100g.
"there is all kinds of forms you've heard of magnesium threate at this point bisglycinate malate and right now I don't know of any compelling evidence to suggest one of those forms is any better than another"
Magnesium supplementation at night for ultra-endurance athletes
Glaze takes magnesium at night as part of his supplement stack, along with D3, K2, zinc, and algae-based omega-3s for his ultra-endurance training.
"I take magnesium at night."
Magnesium needed for 300+ reactions yet half of Americans are deficient
The triage theory of aging suggests suboptimal magnesium intake forces the body to sacrifice long-term health for short-term survival, accelerating.
"Bruce's pet theory, the triage theory of aging, argues that when we have suboptimal dietary micronutrient intake, for example, not getting enough magnesium, our body sacrifices the long term for the short-term."
Magnesium deficiency blocks vitamin D activation and impairs hundreds of enzymes
Magnesium is essential for converting vitamin D into its active hormone form. Being deficient in magnesium can prevent vitamin D from working even if levels look adequate, and it is involved in hundreds of enzymatic processes.
"Being deficient in magnesium may make it more difficult for you to actually make vitamin D hormone."
Magnesium Discussion
Like, you know, I mean, I think, yeah, the core for me is just the krill oil, magnesium, D3. Yeah, and then occasionally, you know, just herbs, I like to cycle with it.
"And then, you know, I take supplements as I need it. Like, you know, I mean, I think, yeah, the core for me is just the krill oil, magnesium, D3."
Magnesium threonate (Mg3N8): crosses the blood-brain barrier to enhance learning and memory
Most magnesium forms can't reach the brain effectively.
"The problem was that you couldn't imagine taking this into humans because most magnesium salts don't passively get from the gut into the bloodstream, into the brain."
Magnesium Discussion
We've known for a long time that there are things that we can do to improve our sleep, and that includes things that we can take, things like magnesium threonate, theanine, chamomile extract, and glycine...
"We've known for a long time that there are things that we can do to improve our sleep, and that includes things that we can take, things like magnesium threonate, theanine, chamomile extract, and..."
Who to Follow
Researchers:
- Carolyn Dean, MD - Author of "The Magnesium Miracle"
- Rhonda Patrick, PhD - Discusses magnesium extensively
Practitioners:
- Andrew Huberman, PhD - Recommends magnesium for sleep
Synergies & Conflicts
Pairs well with:
- Glycine - Enhanced sleep stack
- Vitamin D - Magnesium required for D metabolism
- Zinc - Often deficient together (ZMA stacks)
- Creatine - Both support muscle function
Sleep stack:
- 200-400mg magnesium glycinate
- 3g glycine
- 30-60 minutes before bed
Recovery stack:
- Magnesium + electrolytes post-workout
- Supports muscle relaxation and sleep
Avoid combining:
- Separate from calcium by 2+ hours (competition for absorption)
- Don't take with certain antibiotics
What People Say
Why it's popular:
Common positive reports:
Common complaints: