What Causes Your Eye to Twitch and How to Stop It

Eye twitching is almost always caused by tiny, involuntary contractions of the muscle that circles your eyelid. The most common triggers are stress, fatigue, and caffeine, and the twitching typically resolves on its own within days to a few weeks. In rare cases, persistent twitching signals something more serious worth investigating.

What Happens in Your Eyelid

The muscle responsible is the orbicularis oculi, a thin ring of muscle that controls blinking and squeezing your eyes shut. When nerve fibers within this muscle become irritated, small bundles of muscle fibers start firing on their own in quick, repetitive bursts. You feel it as a fluttering or pulsing sensation, usually in the lower eyelid, though the upper lid can twitch too.

This type of twitching, called eyelid myokymia, is distinct from the full, forceful blinks you’d see with a neurological condition. It’s more of a rippling or undulating movement under the skin. Other people rarely notice it, even though it can feel dramatic from the inside.

The Most Common Triggers

Three factors show up consistently as the primary culprits: stress, fatigue, and caffeine. These don’t damage your eye or eyelid. They increase the excitability of nerve fibers, making spontaneous firing more likely. Think of it like a muscle twitch in your calf after a long day, just happening in a spot where you’re acutely aware of every movement.

Stress raises your body’s baseline level of nervous system activation. When you’re running on adrenaline for days, small muscles are more prone to misfiring. Sleep deprivation does something similar by preventing the normal recovery that keeps nerve signaling stable. Caffeine is a direct stimulant that increases nerve excitability, and many people notice their twitching starts or worsens during periods of high coffee or energy drink consumption.

These three triggers often overlap. A stressful week at work usually comes with poor sleep and extra coffee, which is why eye twitching can seem to appear out of nowhere during busy periods and vanish once things calm down.

Screen Time and Eye Strain

Prolonged screen use contributes to eyelid twitching in a few ways. Staring at a screen reduces your blink rate, which dries out the eye surface and fatigues the muscles around your eyes. The concentrated visual effort also strains the focusing system, adding to overall ocular fatigue. If you’re spending 8 or more hours a day on a computer and then scrolling your phone in the evening, your eyelid muscles are working harder and resting less than they’re designed to.

Uncorrected vision problems make this worse. If you need glasses or your prescription is outdated, your eyes compensate by squinting and straining, which puts extra demand on the orbicularis oculi and increases the chance of twitching.

Nutritional Factors

Magnesium plays a well-established role in regulating how excitable your nerves and muscles are. Low magnesium levels can make muscles throughout your body more prone to twitching and cramping, and your eyelid is no exception. If your diet is low in magnesium-rich foods (nuts, leafy greens, whole grains), this could be a contributing factor.

Vitamin D deficiency deserves mention too, though the connection is less direct. Low vitamin D leads to low calcium levels, and calcium is critical for normal nerve-to-muscle signaling. When calcium drops, neuromuscular excitability increases, which can show up as twitching, spasms, tingling, or numbness. Claims about B12 and other vitamins causing eye twitching specifically aren’t well supported by current research.

Medications That Can Cause Twitching

Certain psychiatric medications are known to trigger or worsen eyelid spasms. Antipsychotic drugs used long-term can cause involuntary muscle movements as a side effect, including eyelid twitching. Some benzodiazepines, which are anti-anxiety medications, have also been reported to aggravate eyelid spasms in certain patients. These effects relate to how these drugs alter signaling in the parts of the brain that control involuntary movement. If your twitching started after beginning a new medication, that’s worth mentioning to whoever prescribed it.

How Long It Typically Lasts

Most episodes of benign eyelid twitching last a few days to a few weeks, then stop on their own. In some cases, twitching can persist for a couple of months, particularly if the underlying trigger (ongoing stress, chronic sleep debt) hasn’t changed. The lower eyelid is affected more often than the upper.

When twitching continues beyond a few months, it falls outside the typical self-limiting pattern and warrants a closer look. A case review in the journal Neuro-Ophthalmology flagged that twitching persisting beyond six months was unusual enough to prompt further investigation, which in that case revealed a brain tumor. That outcome is exceptionally rare, but duration matters.

What You Can Do to Stop It

Since the most common triggers are lifestyle-related, the fix is usually straightforward. Cut back on caffeine, prioritize sleep, and reduce stress where possible. If screen time is a factor, the 20-20-20 rule helps: every 20 minutes, look at something 20 feet away for 20 seconds. This gives your eye muscles a brief reset.

If you suspect a nutritional gap, adding magnesium-rich foods to your diet is a reasonable step. Many people who visit eye clinics for persistent twitching report already taking magnesium supplements, which suggests it’s a widely recognized home remedy. Ensuring adequate vitamin D through sunlight or supplementation addresses the calcium-related pathway as well.

For twitching that persists despite lifestyle changes, injections of botulinum toxin (Botox) into the eyelid muscles can stop the spasms. Most people who go this route need repeat injections every 3 to 4 months. This treatment is typically reserved for chronic cases, not the garden-variety twitch that lasts a week or two.

When Twitching Signals Something Else

Two conditions look similar to common eye twitching but are fundamentally different. Benign essential blepharospasm involves both eyes and causes forceful, synchronized spasms that can become severe enough to make it difficult to keep your eyes open. It’s a neurological movement disorder, not a temporary irritation. Hemifacial spasm affects one entire side of the face, not just the eyelid, and is most commonly caused by a blood vessel pressing on the facial nerve near the brainstem.

Red flags that separate these conditions from ordinary twitching include: the twitch not resolving within a few weeks, your eyelid closing completely with each spasm, difficulty opening the affected eye, twitching spreading to other parts of your face, drooping eyelids, or any redness, swelling, or discharge from the eye. Weakness or stiffness in the affected area is also a sign that something beyond simple myokymia is going on.