Skip to content
Why is my muscle twitching?
Health

Why Is My Muscle Twitching? 7 Causes & How to Stop It

Adelinda Manna
Adelinda Manna

Muscle twitching is caused by electrolyte imbalances (low magnesium, potassium, or calcium), dehydration, caffeine overuse, stress, fatigue, nerve irritation, or — less commonly — a neurological condition. Most single-muscle twitches resolve on their own within days.

What Causes Muscle Twitching? The 7 Most Common Triggers

Muscle twitches — medically called fasciculations — happen when a motor nerve misfires and causes a small group of muscle fibers to contract involuntarily. They are usually benign and trace back to lifestyle factors rather than disease.

Nearly everyone experiences muscle twitching at some point. A 2021 review in Muscle & Nerve found that benign fasciculation syndrome — persistent but harmless twitching — affects an estimated 1 in 10 adults, most commonly in the calves, eyelids, and thumbs.

"Muscle twitches, also called fasciculations, occur when a motor unit fires involuntarily. The most common causes are fatigue, stress, caffeine, and electrolyte imbalances, all of which affect nerve excitability." — Dr. Jerry Swanson, M.D., Neurologist at Mayo Clinic

Is Caffeine Causing Your Muscle Twitches?

Caffeine is a nervous system stimulant that increases the excitability of motor neurons — the nerve cells that fire muscle contractions. Consuming more than 400 mg per day (roughly 4 cups of coffee) significantly raises the likelihood of muscle fasciculations, particularly in the legs, eyelids, and hands. If you've recently increased your caffeine intake and noticed new twitches, cutting back is a straightforward first test.

Is Low Magnesium Making Your Muscles Twitch?

Magnesium plays a direct role in neuromuscular transmission — it acts as a natural calcium channel blocker in muscle cells, preventing spontaneous contractions. When magnesium levels drop, calcium enters muscle cells unchecked, triggering twitches. The recommended daily intake is 420 mg for adult men and 320 mg for adult women; the average American diet provides only about 260 mg per day.

Foods high in magnesium: dark leafy greens, almonds, pumpkin seeds, black beans, and dark chocolate. A supplement (typically 200–400 mg daily of magnesium glycinate or citrate) is an option if dietary sources are insufficient — always confirm with a healthcare provider before starting supplements.

Can Stress and Anxiety Trigger Muscle Twitching?

Stress activates the hypothalamic-pituitary-adrenal axis, releasing cortisol and adrenaline. Both hormones increase nerve excitability directly. Psychological stress also drives hyperventilation, which lowers blood CO₂ levels and alters calcium balance — another path to muscle twitching. If your twitches are worst during stressful periods and improve on weekends or during vacations, stress is the probable driver.

Is Dehydration Behind the Twitching?

Muscle contractions require precise ion gradients across cell membranes. Dehydration disrupts the sodium-potassium balance, causing membrane instability and spontaneous firing. Even mild dehydration (1–2% body weight loss) has been shown to increase muscle excitability. The fix is simple: increase your water intake to 8–10 cups per day and add a pinch of salt or an electrolyte supplement if you've been sweating heavily.

Could It Be Exercise Fatigue?

Overworked muscles twitch. After intense exercise, motor neurons are in a hyper-excited state and can misfire as they recover. Calf and thigh twitches after a run, or forearm twitches after lifting, are classic post-exercise fasciculations and typically resolve within 12–24 hours with rest. If the twitching persists beyond 48 hours after exercise, it may indicate incomplete muscle recovery or a magnesium deficit.

When Should You Worry About Muscle Twitching?

Most muscle twitches are benign. See a doctor if twitching lasts more than two weeks in the same location, is accompanied by muscle weakness or wasting, spreads progressively, or is combined with speech or swallowing difficulties.

The conditions that cause pathological twitching are rare but include:
- Amyotrophic lateral sclerosis (ALS) — twitching accompanied by progressive weakness
- Peripheral neuropathy — twitching with numbness or burning sensations
- Benign fasciculation syndrome — persistent but harmless twitching diagnosed by ruling out other causes
- Medication side effects — diuretics, corticosteroids, beta-agonists, and some asthma inhalers can all cause twitching

"Muscle twitches are rarely a sign of a serious problem when they occur in isolation. However, if twitching is accompanied by significant weakness, wasting, or other neurological signs, prompt medical evaluation is warranted." — Healthline Medical Network at Healthline

How to Stop Muscle Twitching: What Actually Works

The fix depends entirely on the root cause, but most benign twitching responds to these adjustments:

  1. Reduce caffeine — cut back to 1–2 cups of coffee per day for 5–7 days and observe whether twitching decreases.
  2. Increase magnesium — add magnesium-rich foods or a 200–400 mg daily magnesium glycinate supplement.
  3. Hydrate consistently — drink water before you feel thirsty; twitching is often a delayed dehydration signal.
  4. Improve sleep quality — sleep deprivation dramatically increases nerve excitability and is a known cause of eyelid and calf twitches.
  5. Manage stress actively — aerobic exercise, diaphragmatic breathing, and consistent sleep schedules all lower baseline cortisol.
Our Pick

Magnesium and electrolyte supplements clinically studied for muscle health

Trusted by professionals and everyday users alike — a smart investment that pays for itself.

Learn More →

Also Read: Quick electrolyte fix most people reach for first

Our Pick

Electrolyte and magnesium supplements for muscle recovery

No special skills required — straightforward to use and most orders ship quickly.

See on Amazon →

In Short

Muscle twitching is almost always benign and caused by caffeine, low magnesium, dehydration, fatigue, or stress. Reduce caffeine, increase hydration, eat more magnesium-rich foods, and get consistent sleep — most twitches resolve within a week. See a doctor if twitching persists beyond two weeks, is accompanied by weakness, or progresses to new muscle groups.

What You Also May Want To Know

Why does my eyelid twitch so often?

Eyelid twitching (myokymia) is the most common form of benign fasciculation. It almost always traces to caffeine overuse, sleep deprivation, screen fatigue, or stress. Reducing screen time, getting more sleep, and cutting back on coffee typically resolves it within days.

Why are my muscles twitching at night but not during the day?

Nighttime twitching is common because muscle relaxation during the transition to sleep allows previously suppressed spontaneous contractions to become noticeable. Magnesium deficiency is the most common driver of nocturnal muscle twitching — try a 200 mg magnesium glycinate supplement before bed.

Can vitamin deficiencies cause muscle twitching?

Yes. Vitamin D deficiency impairs calcium absorption, which indirectly increases muscle excitability. Vitamin B12 deficiency can cause peripheral nerve damage that manifests as twitching. If you've addressed the lifestyle factors and twitching persists, ask your doctor for a blood panel checking magnesium, calcium, vitamin D, and B12 levels.

Is it normal for muscles to twitch randomly for no reason?

Random benign twitching is very common and affects most adults at some point. It does not indicate ALS or any serious neurological disease on its own. Twitching that occurs in isolation, comes and goes, and does not accompany weakness or wasting is virtually always benign.

How long do benign muscle twitches last?

Benign fasciculations can last anywhere from seconds to several weeks in the same location. If a specific muscle group twitches intermittently for more than two weeks without any accompanying weakness or spread, it is likely benign fasciculation syndrome — harmless but worth mentioning to a doctor for peace of mind.

Reviewed and Updated on July 3, 2026 by George Wright

Share this post