In recent years, magnesium supplements have become the go-to remedy for restless sleepers and health enthusiasts alike. But as more Americans turn to these tablets in search of better sleep and improved health, experts warn that magnesium isn’t a one-size-fits-all solution.

Dr. Edward Saltzman, a professor at Tufts University’s Friedman School of Nutrition Science and Policy, recently addressed the growing trend in the university’s “Ask the Expert” series. While magnesium is indeed essential for many bodily functions—ranging from nerve and muscle function to maintaining a steady heartbeat—Saltzman cautions that not everyone needs to pop a pill.

“Like many vitamins and supplements, some uses of magnesium are strongly supported by scientific evidence, while others are not,” Saltzman noted. This is a crucial distinction in an age where supplements are often marketed as cure-alls without sufficient scrutiny.

For those not familiar, magnesium is a critical mineral that our bodies need in specific amounts. Men should aim for 400 to 420 milligrams daily, while women require 310 to 320 milligrams. Children’s needs vary depending on their age and sex. Fortunately, most people already meet these requirements through a balanced diet that includes foods rich in magnesium, such as almonds, spinach, avocados, and even dark chocolate.

However, the rise in magnesium supplement sales suggests that many believe they aren’t getting enough from their diet. These supplements come in various forms—pills, powders, even teas—marketed for benefits like better sleep, muscle relaxation, and lower blood pressure.

There is some truth to these claims. Research indicates that higher magnesium intake can support bone health, particularly in postmenopausal and elderly women at risk of osteoporosis. Saltzman also mentions that magnesium has been shown to slightly reduce blood pressure, which is good news for those looking for natural ways to manage their health.

But when it comes to sleep, the science is less clear. Magnesium’s role in neurotransmitter release and muscle relaxation suggests it could aid in sleep, but Saltzman emphasizes that the evidence is still inconclusive. Instead of reaching for a magnesium pill, he recommends tried-and-true methods for better sleep: maintaining a consistent bedtime, reducing screen time, and limiting caffeine.

For those who do decide to try magnesium as a sleep aid, moderation is key. Saltzman advises staying close to 300 milligrams per day—slightly less than the recommended daily intake for adults. Going overboard, he warns, can be dangerous. A dose of 5,000 milligrams can be fatal, underscoring the importance of caution.

While there are no known long-term consequences of taking magnesium supplements, one immediate side effect is diarrhea, particularly if taken in high doses. Parents are especially encouraged to consult a pediatrician before giving their children any supplements.

Another important consideration is that supplements aren’t regulated by the Food and Drug Administration (FDA) like medications. Saltzman suggests looking for brands certified by the United States Pharmacopeial Convention (USP), a third-party organization that ensures supplement quality.

Nicole Roach, a registered dietitian at Northwell Lenox Hill Hospital, echoes Saltzman’s caution, noting that magnesium can interact with prescription medications. She also points out that not all magnesium supplements are created equal. Different forms, such as magnesium oxide, citrate, or glycinate, target different health outcomes.

In the end, while magnesium supplements may be helpful for some, they’re not a magic bullet. As with any health trend, it’s essential to do your homework, consult with healthcare professionals, and approach supplementation with a critical eye.