What can cause muscle twitching?

Medical Advisory BoardAll articles are reviewed for accuracy by our Medical Advisory Board
Educational purpose only • Exercise caution as content is pending human review
Article Review Status
Submitted
Under Review
Approved

Last updated: June 20, 2025View editorial policy

Personalize

Help us tailor your experience

Which best describes you? Your choice helps us use language that's most understandable for you.

From the Guidelines

Muscle twitching can be caused by a variety of factors, including statin therapy, as indicated by the 2013 ACC/AHA guideline on the treatment of blood cholesterol to reduce atherosclerotic cardiovascular risk in adults 1. When considering the potential causes of muscle twitching, it's essential to evaluate the patient's medical history, current medications, and lifestyle factors.

  • Stress, anxiety, and fatigue can contribute to muscle twitching, as well as excessive caffeine consumption, dehydration, and electrolyte imbalances, particularly low levels of magnesium, calcium, or potassium.
  • Certain medications, such as corticosteroids, estrogens, and some psychiatric drugs, can also cause muscle twitching, as noted in the guideline 1.
  • Additionally, neurological conditions like amyotrophic lateral sclerosis (ALS), multiple sclerosis, muscular dystrophy, and peripheral neuropathy can trigger muscle twitches, as can infections, kidney or thyroid disorders, and autoimmune diseases.
  • The guideline recommends evaluating patients for other conditions that might increase the risk for muscle symptoms, such as hypothyroidism, reduced renal or hepatic function, rheumatologic disorders, steroid myopathy, vitamin D deficiency, or primary muscle diseases 1. It's crucial to note that most muscle twitches are benign and temporary, resolving with rest, proper hydration, and balanced nutrition. However, if twitching persists for more than a few days, is accompanied by weakness, pain, or other concerning symptoms, medical evaluation is recommended to rule out underlying conditions that may require specific treatment, as suggested by the guideline 1. In the context of statin therapy, the guideline advises discontinuing the statin until the symptoms can be evaluated and considering other causes of muscle symptoms if they do not resolve completely after 2 months without statin treatment 1.

From the Research

Causes of Muscle Twitching

  • Muscle twitching can be caused by various factors, including excessive caffeine consumption 2, 3, 4
  • Caffeine is a stimulant that can affect the central nervous system and lead to muscle twitching, especially when consumed in high amounts 2
  • Other factors that can contribute to muscle twitching include:
    • Magnesium deficiency or imbalance, as magnesium plays a crucial role in muscle function and nerve transmission 5
    • Electrolyte imbalances, such as changes in calcium, potassium, and sodium levels 6
    • Dehydration or changes in fluid balance, which can affect muscle function and lead to twitching
  • It is essential to note that muscle twitching can also be a symptom of underlying medical conditions, and if persistent or severe, it should be evaluated by a healthcare professional

Caffeine-Related Muscle Twitching

  • Excessive caffeine consumption can lead to muscle twitching, as well as other symptoms such as psychomotor agitation, insomnia, and headache 2, 4
  • The amount of caffeine that can cause muscle twitching varies from person to person, but high doses (above 400mg per day) are more likely to lead to adverse effects 2, 3
  • Caffeine can also interact with other substances, such as certain medications, and exacerbate muscle twitching or other side effects 3

Nutritional Factors

  • Magnesium intake can help reduce blood pressure and improve cardiovascular health, and magnesium deficiency has been linked to muscle twitching and other muscle disorders 5
  • Other nutritional factors, such as potassium and calcium intake, can also affect muscle function and contribute to muscle twitching 6

References

Guideline

Guideline Directed Topic Overview

Dr.Oracle Medical Advisory Board & Editors, 2025

Research

[Caffeine--common ingredient in a diet and its influence on human health].

Roczniki Panstwowego Zakladu Higieny, 2012

Research

International society of sports nutrition position stand: caffeine and exercise performance.

Journal of the International Society of Sports Nutrition, 2021

Research

Behavioral treatment of caffeinism: reducing excessive coffee drinking.

Journal of applied behavior analysis, 1979

Research

The role of magnesium in hypertension and cardiovascular disease.

Journal of clinical hypertension (Greenwich, Conn.), 2011

Professional Medical Disclaimer

This information is intended for healthcare professionals. Any medical decision-making should rely on clinical judgment and independently verified information. The content provided herein does not replace professional discretion and should be considered supplementary to established clinical guidelines. Healthcare providers should verify all information against primary literature and current practice standards before application in patient care. Dr.Oracle assumes no liability for clinical decisions based on this content.

Have a follow-up question?

Our Medical A.I. is used by practicing medical doctors at top research institutions around the world. Ask any follow up question and get world-class guideline-backed answers instantly.