Magnesium Deficiency: Causes, Symptoms, and Treatment
Medically reviewed by Harsha Moole, MD, Internal Medicine. Last reviewed: October 23, 2026.
What kind of doctor treats magnesium deficiency?
A primary care doctor (family medicine or internal medicine) usually treats low magnesium, and an endocrinologist (hormone doctor) may help if it is caused by a hormone or metabolic problem. Your primary care doctor can order a blood test, look for the cause, and suggest diet changes or a supplement. See a doctor sooner if you have muscle cramps, weakness, or an irregular heartbeat.
What is magnesium deficiency?
Magnesium deficiency means you have less magnesium in your blood than normal. The medical name for it is hypomagnesemia. Magnesium is a nutrient your body needs to stay healthy. It helps control muscle and nerve function, blood sugar levels, and blood pressure. Every organ needs it, most of all the heart, muscles, and kidneys. Many foods have it. Milk and yogurt have it too. So do nuts, seeds, and beans.
Symptoms
In healthy people, getting too little magnesium for a short time does not cause obvious symptoms. The kidneys help the body keep magnesium. Early signs of deficiency include loss of appetite, nausea, vomiting, tiredness, and weakness. As it gets worse, it can cause:
- Numbness and tingling.
- Muscle spasms and cramps.
- Abnormal eye movements.
- Changes in how a person acts and feels.
- An abnormal heart rhythm.
- Seizures, which are also called convulsions.
Untreated, it can lead to cardiac arrest (the heart stops) or respiratory arrest (breathing stops).
Causes and who gets it
Common causes of low magnesium include:
- Alcohol use over many years.
- Diarrhea that lasts a long time.
- Passing too much urine, such as in uncontrolled diabetes.
- Celiac disease and other gut diseases that block nutrients.
- Poor nutrition, which is called malnutrition.
- Swelling of the pancreas.
- Sweating a lot.
- Burns over a large area of the body.
- Hyperaldosteronism, when a gland makes too much of the hormone aldosterone.
Some medicines can also lower it. These include water pills, acid-reducing medicines, and some antibiotics. Proton pump inhibitors can cause low levels when taken for a long time, usually more than a year. Eating too little of it for a long time can also lead to deficiency.
These groups are more likely to get too little magnesium:
- People with digestive diseases, such as Crohn's disease and celiac disease.
- People with type 2 diabetes.
- People who have had alcoholism for a long time.
- Older adults.
How doctors diagnose it
Your health care provider will do a physical exam and ask about your symptoms. A blood test checks your magnesium level. Normal ranges vary a bit, so ask your provider what your result means. A heart tracing test called an ECG may also be ordered.
Other blood and urine tests may also be done.
Treatment
Treatment depends on how low your magnesium is. It may include:
- Fluids given through a vein (IV).
- Magnesium by mouth or through a vein.
- Medicines to relieve symptoms.
Treating the condition that is causing low magnesium can help. Eating a variety of foods helps you get enough. How well you do depends on the cause and how low the magnesium is.
Too much from pills or medicines can cause problems too. It can cause diarrhea, nausea, and belly cramps. Very high amounts can lead to an irregular heartbeat and cardiac arrest. Do not take more than the upper limit from supplements and medicines unless a health care provider recommends it. Magnesium pills can also affect some medicines, so tell your doctor what you take.
When to see a doctor
When your magnesium level drops too much, it can be a life-threatening emergency. Contact your provider right away if you have symptoms of low magnesium. Call 911 or go to the emergency room if you have chest pain, trouble breathing, fainting, or a seizure. If you take a proton pump inhibitor for a long time, your doctor may check your magnesium level from time to time.
How a direct primary care or concierge doctor fits in
A direct primary care doctor charges a flat monthly fee instead of billing insurance, while a concierge doctor usually charges more and often works alongside insurance. Such a doctor can order the blood test and review your medicines, since some can lower magnesium.
Common questions
What are the signs of low magnesium?
Low magnesium can cause muscle cramps, spasms, weakness, tiredness, and in some people an irregular heartbeat. A simple blood test done by your primary care doctor can check your magnesium level.
Can a direct primary care doctor manage magnesium deficiency?
Yes. A direct primary care doctor can order the blood test, find common causes such as certain medicines or digestive problems, and recommend foods or a supplement to bring your level back to normal. Severe low magnesium can be an emergency and may need magnesium given through a vein.
What foods help raise magnesium levels?
Foods like leafy green vegetables, nuts, seeds, beans, and whole grains naturally contain magnesium. Your primary care doctor can suggest simple diet changes based on your test results and overall health before recommending any supplement.
Sources
- MedlinePlus - Magnesium deficiency
- NIH Office of Dietary Supplements - Magnesium (Consumer Fact Sheet)
- NIH Office of Dietary Supplements - Magnesium (Health Professional Fact Sheet)
Medical Disclaimer
This content is for general educational and informational purposes only and is not medical advice. It is not a substitute for professional medical advice, diagnosis, or treatment, and reading it does not create a doctor-patient relationship. Always seek the advice of your physician or another qualified health provider with any questions about a medical condition, and never disregard or delay seeking professional advice because of something you read here. If you think you may have a medical emergency, call 911 (or your local emergency number) immediately.