Most muscle twitching is harmless and stops on its own once you address the trigger behind it. The most common causes are stress, caffeine, poor sleep, and low magnesium levels. In the vast majority of cases, simple lifestyle changes resolve the problem within days to weeks.
Why Your Muscles Twitch
A muscle twitch, or fasciculation, is a small, involuntary contraction of muscle fibers. It can happen anywhere in the body but most commonly affects the eyelids, calves, thumbs, and arms. The firing originates from overexcited nerves that send signals to muscle fibers without your brain telling them to.
Several everyday factors push nerves into this hyperexcitable state. Caffeine blocks receptors in the brain that normally calm neural activity, which increases muscle fiber recruitment and can trigger twitching. Stress hormones change how the connection between nerves and muscles works: cortisol increases the spontaneous release of the chemical messenger that tells muscles to contract, essentially making the nerve-muscle junction “leakier.” Sleep deprivation amplifies this by raising cortisol and inflammatory markers, creating a feedback loop where exhaustion fuels more twitching.
Low magnesium is one of the most overlooked causes. Magnesium acts as a natural calcium blocker in your cells. When magnesium drops too low, calcium floods into muscle cells unchecked, making them contract on their own. This leads to twitching, cramps, and spasms. Magnesium deficiency can also pull potassium and calcium levels down with it, compounding the problem.
Reduce Caffeine and Stimulants
If you’re twitching regularly, caffeine is the first thing to cut back on. Research doses as low as 3 mg per kilogram of body weight (roughly 200 mg for an average adult, or about two cups of coffee) are enough to measurably change muscle contraction properties. Higher intakes, around 9 mg per kilogram, produce even stronger effects on muscle fiber excitability. Energy drinks, pre-workout supplements, and some teas stack caffeine in ways that push you well past these thresholds without you realizing it.
You don’t necessarily need to quit caffeine entirely. Try halving your intake for a week and see if the twitching slows. If it does, you’ve found your trigger. Cutting caffeine abruptly can cause headaches, so tapering over a few days is easier.
Stretch the Affected Muscle
When a twitch starts, stretching the muscle can interrupt it. Static stretching, where you hold a position without bouncing, is the most effective approach. Hold the stretch for at least 60 seconds. Research shows that stretches shorter than 60 seconds don’t produce a meaningful reduction in muscle tension. The sweet spot is 60 to 120 seconds, repeated for up to five sets, which has been shown to reduce muscle resistance and passive stiffness.
For a twitching calf, stand on the edge of a step and let your heel drop below the platform. For an eyelid twitch, gently press a warm cloth over the closed eye for a minute or two. The warmth relaxes the tiny muscles around the eye and increases blood flow.
Fix Your Magnesium Intake
Most adults don’t get enough magnesium from food alone. Dark leafy greens, nuts, seeds, beans, and whole grains are the best dietary sources. If you suspect a deficiency, supplementation can help. Clinical studies have used daily elemental magnesium doses ranging from 200 to 366 mg, delivered through forms like magnesium citrate, magnesium lactate, and magnesium malate.
The form matters more than most people realize. Magnesium oxide, the cheapest and most common supplement on shelves, is poorly absorbed. Magnesium citrate and magnesium glycinate are better options for raising your levels efficiently. Citrate can have a mild laxative effect at higher doses, so glycinate tends to be easier on the stomach. Start with 200 mg of elemental magnesium daily and give it two to three weeks to see results. Your body needs time to replenish intracellular stores, not just blood levels.
Prioritize Sleep
Sleep deprivation raises cortisol and shifts inflammatory markers like IL-6, both of which affect how your nerves and muscles communicate. Even one night of total sleep loss measurably increases cortisol and disrupts the hormonal balance (including growth factors like IGF-1) that your muscles depend on for normal function and recovery.
There’s no magic number of hours that “fixes” twitching, but consistently getting seven to eight hours gives your nervous system the recovery window it needs. If your twitching is worst in the evening or after poor sleep, that’s a strong signal that fatigue is a primary driver. Improving sleep hygiene, keeping a consistent wake time, limiting screens before bed, and avoiding caffeine after noon, often resolves twitching within a week or two.
Manage Stress Directly
Telling someone to “reduce stress” is vague, so here’s what actually works physiologically. Slow, deep breathing at a rate of about six breaths per minute activates the parasympathetic nervous system, which directly counteracts the cortisol-driven nerve excitability behind twitching. Even five minutes of controlled breathing can lower the stress response enough to quiet an active twitch. Regular physical exercise, particularly moderate aerobic activity, lowers baseline cortisol over time and reduces the frequency of stress-related fasciculations.
Check Your Medications
Several common medications can cause or worsen muscle twitching. Antidepressants, particularly SSRIs and tricyclic antidepressants, are well-documented triggers of tremor and involuntary muscle movements. Lithium, antiepileptic drugs (especially valproate), bronchodilators like albuterol, and some immunosuppressive drugs can all produce the same effect. Stimulant medications used for ADHD, such as methylphenidate, and recreational stimulants like amphetamines and cocaine also cause twitching, tremor, and involuntary jerking movements called myoclonus.
If your twitching started shortly after beginning a new medication or changing your dose, that connection is worth raising with whoever prescribed it. Don’t stop a prescribed medication on your own, but knowing this is a recognized side effect gives you a concrete question to bring to your next appointment.
When Twitching Signals Something Serious
The vast majority of twitching is benign. Benign fasciculation syndrome is a recognized condition where persistent twitching occurs with no underlying disease. It’s diagnosed when a neurological exam, nerve conduction study, and electromyography all come back normal. The defining feature that separates benign twitching from something like ALS is the absence of muscle weakness and muscle wasting.
Pay attention to these specific red flags:
- Visible muscle shrinkage: one arm or leg becoming noticeably smaller than the other
- Progressive weakness: difficulty gripping objects, trouble walking, or frequent tripping
- Numbness or tingling: persistent sensations in your arms or legs alongside the twitching
- Difficulty swallowing or speaking: changes in your voice or trouble getting food down
- Facial weakness: drooping or asymmetry in your face
If twitching has persisted for weeks without any of these symptoms, it is almost certainly benign. If any of these warning signs appear alongside your twitching, a neurological evaluation can rule out conditions that need treatment.

