Why Is My Eye Twitching? Causes and How to Stop It

Your eye is twitching because a tiny muscle in your eyelid is firing on its own, usually triggered by some combination of stress, poor sleep, caffeine, or too much screen time. The medical term is eyelid myokymia, and it’s almost always harmless. A single motor unit in the muscle around your eye starts pulsing in short, rhythmic bursts, creating that fluttering sensation you can feel but others usually can’t see. Most cases resolve on their own within a few days to a few weeks once the underlying trigger settles down.

What’s Actually Happening in Your Eyelid

The muscle responsible is the orbicularis oculi, a ring-shaped muscle that circles your eye and controls blinking and squinting. During a twitch, a small bundle of fibers in that muscle begins firing involuntarily at a rate of 3 to 8 pulses per second. These bursts are separated by very brief pauses and aren’t synchronized with the rest of the muscle, which is why the twitch feels like a localized flutter rather than a full blink. Moving your eye or blinking deliberately can make the firing more noticeable, but it doesn’t cause it.

This type of involuntary firing happens in healthy people with no underlying nerve damage. It’s essentially a localized muscle spasm, similar to the random twitches you might get in your calf or thumb. The lower eyelid is affected more often than the upper, and it typically stays on one side.

The Most Common Triggers

Eyelid twitching rarely has a single cause. It’s usually several factors stacking up at once. The big three are stress, sleep deprivation, and caffeine, but a few other triggers are worth knowing about.

  • Stress and anxiety. Mental tension increases nervous system excitability, making involuntary muscle firing more likely. Many people first notice their eye twitching during high-pressure periods at work or home.
  • Poor sleep. Fatigue is one of the most consistent triggers. Even a few nights of shortened sleep can be enough.
  • Caffeine. Coffee, energy drinks, and tea are all stimulants that increase nerve excitability. If you’ve recently upped your intake, that’s a likely contributor.
  • Alcohol and tobacco. Both are associated with eyelid twitching, possibly through their effects on nerve signaling and sleep quality.
  • Dry eyes. When your eyes are dry or irritated, you blink and squint more, which fatigues the eyelid muscle.

Screen Time Is a Major Factor

A 2024 study found a strong link between digital screen time and eyelid twitching. People with twitching averaged close to 7 hours of daily screen time, compared to under 5 hours in the non-twitching group. The correlation was dose-dependent: the more hours spent on screens, the longer the twitching persisted.

The mechanism makes sense when you think about what your eyelid muscles are doing during screen use. Bright screen light causes your eyelids to partially squint, keeping the orbicularis oculi in a state of low-level contraction for hours. At the same time, focused screen work reduces your blink rate, which means the muscle doesn’t get the regular relaxation cycles that normal blinking provides. The combination of prolonged contraction and insufficient relaxation sets the stage for involuntary spasms. If you wear glasses or contacts with an outdated prescription, the squinting effect is even more pronounced because your eyes are working harder to focus.

Low Magnesium and Other Deficiencies

Magnesium plays a key role in muscle relaxation, and low levels have been linked to eyelid twitching. One study found that patients with low magnesium who complained of eye twitching also showed measurable changes in the blood vessel structure of their retinas, suggesting the mineral’s effects on the eye are more than superficial. Magnesium deficiency is relatively common, particularly in people who eat limited amounts of nuts, seeds, leafy greens, and whole grains.

Potassium and B12 deficiency may also contribute, though the evidence is less direct. If your twitching is persistent and you suspect a nutritional gap, a simple blood test can check your levels.

Can Medications Cause It?

Certain medications have been linked to eyelid twitching, though this is far less common than lifestyle triggers. Drugs used for seizures, migraines, and certain psychiatric conditions have all appeared in case reports. Metformin, a widely used diabetes medication, was recently identified as a cause in at least one well-documented case, possibly through its known tendency to lower B12 levels over time. If your twitching started shortly after beginning a new medication, that timing is worth noting.

How to Stop the Twitching

Since most eyelid twitching comes from a pile-up of lifestyle factors, the fix is working through that list. Start with the changes most likely to matter:

  • Cut back on caffeine. If you’re drinking more than two cups of coffee a day, try reducing for a week and see if the twitching eases.
  • Prioritize sleep. Even one or two extra hours per night can make a noticeable difference within days.
  • Reduce screen time. If you can’t cut hours, take regular breaks. The 20-20-20 rule (every 20 minutes, look at something 20 feet away for 20 seconds) gives your eyelid muscles a chance to relax.
  • Manage stress. Exercise, breathing techniques, or simply identifying the source of tension can help lower baseline nervous system activity.
  • Use lubricating eye drops. If your eyes feel dry or gritty, artificial tears reduce the irritation that contributes to squinting and muscle fatigue.
  • Apply a warm compress. A warm, damp cloth held gently over the affected eye for a few minutes can relax the muscle and provide temporary relief.

Most twitches stop within a few days to a few weeks once you address the triggers. Some last longer, especially if the underlying cause (like chronic stress or heavy screen use) hasn’t changed.

When Twitching Signals Something Else

Benign eyelid twitching is extremely common and not dangerous, but two rarer conditions can start with similar symptoms and are worth knowing about.

Blepharospasm involves involuntary contractions of the eyelid muscles on both sides. Unlike a simple twitch, it causes forceful, sustained squeezing that can temporarily close both eyes. It often involves the forehead and brow muscles as well, and it tends to get progressively worse over months rather than resolving on its own.

Hemifacial spasm causes twitching or clenching on one side of the face, not just the eyelid. It typically starts around the eye but gradually spreads to involve the cheek, mouth, and jaw on the same side. This condition is caused by a blood vessel pressing on the facial nerve.

Signs that your twitch deserves medical attention include: it lasts longer than a few weeks without improving, it spreads beyond the eyelid to other parts of your face, it causes your eye to close completely, or it’s accompanied by redness, swelling, or drooping. For persistent cases that don’t respond to lifestyle changes, small injections of botulinum toxin into the affected eyelid muscle can relax it for three to six months at a time.