Someone please explain why my eye won’t stop twitching

Filed under bad surprises: finding out your ex is seeing someone new, learning your milk is expired after pouring it into your coffee, and random eye twitches that come out of nowhere. Why do bad things happen to good people?

While it’s definitely annoying, chances are a little bit of eye twitching (or eyelid myokymia, if you’re nasty) every once in a while isn’t a real cause for concern. Basically, it happens when the muscles around your eyelid spasm, forcing your lid to move involuntarily and making it feel like your lids are extras in a horror movie.

But that doesn’t change the fact that it’s annoying AF, and more than a little disruptive to day-to-day life. (Thankfully, the phenomenon is usually too small for your friends, partner, or coworkers to notice, according to the American Academy of Ophthalmology. So there’s that!)

If this sounds familiar and you’re looking to get your eye twitching under control, here are a few things that could be causing it to go haywire—and a few things you can do to start dealing with it today.

Why is my eye twitching, you ask? Here are some possible causes:

1. You’re not getting enough sleep. The National Sleep Foundation recommends that adults get between 7 and 9 hours of sleep per night. And according to Robert Graham, MD, not getting enough sleep could be contributing to that whole eye twitching thing. So if you’re eye’s been going crazy for days and you’ve also been staying up too late every night, your exhaustion might be the source of your persistent twitches.

2. Stress or anxiety. Stressed at work? Anxious about anything and everything? Dr. Graham says that both of these things can lead to eye twitches. If you suspect this is the case, try traditional stress-reduction tactics like hitting up your favorite spin class, meditating, going for a walk, or setting aside some quiet time with your favorite book—however you choose to relax, lowering your stress levels should help banish your eye twitch.

3. Electrolyte imbalances. If your eye is twitching and you can’t figure out the cause, Dr. Graham suggests taking supplements that could help balance your electrolytes (which help control muscle function), like magnesium and potassium. If you’d rather get those minerals through your diet, try loading up on bananas and sweet potatoes.

4. Eye strain. If you keep refreshing Instagram and checking your email a thousand times a day, your stress levels aren’t the only thing that’s suffering—you’re also straining your eyes. And Dr. Graham says that eye strain could lead to eye twitching. Try eliminating so much time on your computer, phone, or tablet, and take regular eye breaks (where you look away from your screen and off at a distant point for at least 20 seconds).

5. Caffeine. We know, we know—there are few things better than a steaming hot cup of coffee first thing in the morning. The only problem? Caffeine consumption has been linked to eye twitching, says Dr. Graham. So if you notice your eye going crazy after your morning caffeine jolt, consider pulling back on it a bit and see if it makes a difference.

6. Certain meds. Eye twitching can be a frustrating side effect of some medications, including some meds that are used to treat Parkinson’s disease. (If you suspect your medication might be causing your eye twitch, do not go cold turkey—talk to your doctor about your options.)

How to treat a twitching eye in a pinch

If your twitching eye is getting on your nerves and you don’t want to wait for a normal amount of sleep and a magnesium supplement to kick in, there is a home remedy you can try. “Apply warm compresses to the twitching eye and gently massage the eyelid with your fingers,” suggests Dr. Graham. Sounds pretty relaxing to me.

When to see a doctor

Of course, a twitching eye isn’t always harmless. There are times when it’s a sign of a bigger underlying problem. For example, if your eye is twitching and there’s also redness and crusty buildup or pus present, you’re probably dealing with pink eye or some other eye infection. Very rarely, a persistent eye twitch can be an early signal of a serious neurological disorder such as Tourette syndrome or multiple sclerosis. But as the Mayo Clinic notes, if you are suffering from an underlying disease, you’ll probably experience symptoms besides just eye twitching.

Again, the majority of eye twitching cases are benign (so don’t totally freak out!). Dr. Graham says that if your eye twitching is persistent and you suspect you could have an infection or another issue, it’s important go see a doctor ASAP to rule it out.