Curious Minds

Clear answers to science and history questions

How to Get Rid of Muscle Twitching

· 7 min read · Science

Most benign muscle twitching settles within 10–20 minutes of rest, hydration and a change of position, and you can start the fix in about 5 minutes with no equipment. The method: stop the trigger, replace what the muscle is missing (water, electrolytes, sleep), then gently load and stretch the twitching area.

Stop the Trigger First

Twitching often starts within minutes of a specific input: a third cup of coffee, a hard workout, a night of poor sleep, or hours in one position. Before you add anything, remove the obvious cause for 30–60 minutes and see whether the twitch quiets on its own.

  1. Cut caffeine for the rest of the day. Skip coffee, tea, cola and energy drinks. A single strong coffee can keep a twitch going for hours in a sensitive person. If you normally drink 3 cups, dropping to 0 for 24 hours is a clean test.
  2. Put down the phone and the controller. Sustained fine-motor work (typing, gaming, scrolling) holds the same small muscles in a low-level contraction. Take a 5-minute break every 30 minutes and let the hand or eyelid rest completely.
  3. Change position. If the twitch is in a calf or thigh, stand up and walk for 2–3 minutes. If it is in an eyelid or cheek, look away from the screen and blink slowly 10 times.
  4. Check your sleep debt. A single night under about 6 hours is enough to make twitching more likely. Aim for 7–9 hours for the next two nights before you decide the twitch is a medical problem.

If the twitch stops within an hour of removing the trigger, you have your answer: it is a benign, reversible twitch and no treatment is needed beyond repeating the step when it returns.

Water, Salt and Magnesium

Muscle fibres depend on a narrow balance of sodium, potassium, calcium and magnesium across the cell membrane. Sweating, vomiting, diarrhoea, diuretics and heavy water intake without food can all shift that balance enough to cause visible twitching. Replacing fluid and electrolytes is the next step, and it is cheap and fast.

  1. Drink 500 ml (about 2 cups) of water over 15 minutes. Sip it rather than gulping, and pair it with a small salty snack — a handful of crackers, a pinch of salt in a glass of water, or a cup of broth.
  2. Add a potassium source. One medium banana, one medium potato with skin, or 1 cup (240 ml) of orange juice supplies a useful amount. Do not take potassium supplements unless a clinician has told you to; too much is dangerous.
  3. Try magnesium glycinate or citrate, 200–400 mg, once daily with food, for 1–2 weeks. This is the supplement with the best evidence for benign twitching and cramps. Stop if it causes loose stools, which is the main side effect of the citrate form.
  4. Do not overdrink plain water. More than about 1 litre per hour of plain water without food can dilute sodium and make twitching worse. Spread fluid across the day.

People with kidney disease, heart failure or a sodium-restricted diet should not add salt or magnesium without checking with their clinician first. If you take a diuretic or a proton-pump inhibitor, ask whether your magnesium should be checked.

Load and Stretch the Twitching Muscle

A twitch is an involuntary discharge of a motor unit, and gentle voluntary contraction followed by a slow stretch often interrupts it. This works best for calf, thigh, hand and eyelid twitches and takes about 5 minutes.

  1. Contract the muscle gently for 5 seconds, then relax for 5 seconds. Repeat 5 times. For a calf, press the foot down as if on a pedal. For a hand, make a soft fist. For an eyelid, squeeze the eyes shut for 2 seconds and release.
  2. Stretch the muscle for 30 seconds, twice. Calf: stand with the heel down and lean into a wall. Thigh: pull the heel toward the buttock while standing. Hand: extend the fingers and wrist with the palm down.
  3. Apply warmth for 10 minutes. A warm shower, a heating pad on the low setting, or a warm towel relaxes the surrounding tissue. Do not fall asleep on a heating pad, and do not use heat on numb skin.
  4. Massage the area for 2 minutes with firm, slow strokes along the length of the muscle, not across it.

If the twitch is in a foot or hand and happens mostly at rest, a short walk or a few minutes of gentle use often settles it faster than stretching alone.

Telling Benign Twitching From Something Else

Benign fasciculation is common, painless, and comes and goes in the same small area — an eyelid, a calf, a thumb. It does not cause weakness, and it does not change how you walk or grip. The distinction matters because the rare serious causes of twitching come with other signs, not twitching alone.

What you noticeWhat it suggestsWhat to do
Twitch in one eyelid or calf, no weakness, normal strengthBenign fasciculation, often from caffeine, poor sleep or stressTry the steps above for 1–2 weeks
Twitch plus new weakness — dropping objects, tripping, trouble climbing stairsNeeds medical assessmentSee a clinician promptly
Twitch plus muscle wasting or a change in speech or swallowingNeeds medical assessmentSee a clinician promptly
Twitch plus numbness, tingling or pain in the same areaPossible nerve irritationSee a clinician
Twitch after starting a new medicinePossible drug effectAsk the prescriber before stopping

Call a clinician the same day if twitching comes with a fever, confusion, a new inability to walk, or twitching that spreads rapidly across the whole body. These are not benign-twitch patterns.

A Worked Example: Calf Twitch After a Run

Suppose you finish a 45-minute run in warm weather, and 20 minutes later the right calf is visibly twitching every few seconds. You had two coffees that morning and slept 5 hours.

  1. Stop caffeine for the rest of the day (0 cups instead of the usual afternoon cup).
  2. Drink 500 ml of water with a pinch of salt over 15 minutes, then eat a banana.
  3. Do 5 gentle calf contractions of 5 seconds each, then two 30-second wall stretches.
  4. Take a warm shower for 10 minutes, then massage the calf for 2 minutes.
  5. Go to bed 60–90 minutes earlier than usual.

In this pattern the twitch usually fades within 30–60 minutes. If it is still firing the next morning, repeat the water and salt step and add magnesium 200–400 mg with food for a week. If it is still present after two weeks, or if you notice any weakness, book an appointment.

If This, Then That

  • If the twitch follows caffeine, cut caffeine to zero for 24 hours and reintroduce at half your usual amount.
  • If the twitch follows a hard workout, treat fluid, salt and sleep first; stretching alone rarely fixes it.
  • If the twitch is in an eyelid and you are screen-tired, take a 10-minute break every hour and use lubricating eye drops if the eye feels dry.
  • If the twitch is widespread and you have been vomiting or had diarrhoea, use an oral rehydration solution rather than plain water, and seek care if you cannot keep fluids down.
  • If the twitch comes with new weakness, skip the home steps and see a clinician.
  • If the twitch is still there after 2 weeks of the steps above, see a clinician for an exam and, if indicated, blood tests for magnesium, calcium, potassium and thyroid function.

Twitching That Returns Every Night

Night-time twitching in the legs is often driven by the same factors as daytime twitching, plus a long period of stillness. A 5-minute walk before bed, 500 ml of water with a salty snack in the evening, and a consistent sleep and wake time reduce how often it fires. Avoid alcohol within 3 hours of bed; it fragments sleep and worsens twitching in many people. If the twitching is painful, wakes you repeatedly, or comes with an urge to move the legs, describe that pattern to a clinician — it points to a different problem than benign fasciculation.

When Twitching Needs a Clinician

Book an appointment if any of these apply: twitching in one area that has not improved after 2 weeks of trigger removal, water and magnesium; twitching with weakness, wasting, or a change in speech or swallowing; twitching with numbness or pain; twitching after a new medicine; or twitching with fever, confusion or a new inability to walk. Bring a note of when it started, which muscles are involved, what makes it better or worse, your caffeine and sleep habits, and any supplements or medicines you take. That list shortens the visit and helps the clinician decide whether blood tests or a nerve study are needed.

In this article
  1. Stop the Trigger First
  2. Water, Salt and Magnesium
  3. Load and Stretch the Twitching Muscle
  4. Telling Benign Twitching From Something Else
  5. A Worked Example: Calf Twitch After a Run
  6. If This, Then That
  7. Twitching That Returns Every Night
  8. When Twitching Needs a Clinician