Doctors Note Logo

Published on: 3/13/2026

Eye Twitching and Lack of Sleep: How to Stop the Spasms

Eye twitching is usually harmless and most often linked to lack of sleep; prioritizing 7 to 9 hours of rest, cutting back on caffeine, managing stress, resting dry or strained eyes, using warm compresses, staying hydrated, and ensuring adequate magnesium can stop or prevent spasms, often within days to a couple of weeks.

There are several factors and important red flags to consider, so see below for the complete guidance, including when to seek medical care if twitching persists for several weeks, fully closes the eyelid, spreads to the face, affects vision, or occurs with eye redness, swelling, or discharge.

answer background

Explanation

Eye Twitching and Lack of Sleep: How to Stop the Spasms

Twitching eyes are common, annoying, and usually harmless. If your eyelid has ever started jumping after a long night or a stressful week, you are not alone. One of the most frequent causes of eye twitching is lack of sleep.

The good news: in most cases, eyelid twitching is temporary and goes away on its own. The better news: there are simple steps you can take to stop the spasms and prevent them from coming back.

Let's break down why twitching eyes happen, how sleep affects them, and what you can do to fix it.


What Is Eye Twitching?

Eye twitching—also called eyelid myokymia—is a repetitive, involuntary spasm of the eyelid muscles. It usually affects the lower eyelid but can also involve the upper lid. The twitch may:

  • Come and go throughout the day
  • Last a few seconds or several minutes
  • Persist for days or even weeks
  • Affect one eye at a time

In most cases, twitching eyes are painless and do not affect vision. However, they can feel distracting or frustrating.


Why Lack of Sleep Causes Twitching Eyes

Sleep is essential for muscle recovery and nervous system regulation. When you don't get enough rest, your body reacts in several ways that can trigger eyelid spasms.

Here's how sleep deprivation contributes to twitching eyes:

1. Increased Nerve Irritability

Lack of sleep makes your nervous system more sensitive. The small muscles around your eyelids are especially prone to overstimulation.

2. Higher Stress Hormones

When you are sleep-deprived, your body produces more stress hormones like cortisol. Stress is one of the most common triggers of twitching eyes.

3. Muscle Fatigue

Just like your arms or legs, the muscles around your eyes get tired. Long days combined with short nights make twitching more likely.

4. More Screen Time

People who sleep less often spend more time on screens. Digital eye strain can worsen twitching.


Other Common Causes of Twitching Eyes

While lack of sleep is a major factor, other triggers can make it worse:

  • Stress and anxiety
  • Too much caffeine
  • Alcohol use
  • Dry eyes
  • Eye strain
  • Nutrient imbalances (such as low magnesium)
  • Allergies

Often, twitching eyes are caused by a combination of these factors.


How to Stop Twitching Eyes

If lack of sleep is the main trigger, improving your rest is the most effective solution. Here's what works:

1. Prioritize Sleep

Aim for 7–9 hours of quality sleep per night. To improve sleep:

  • Go to bed and wake up at the same time daily
  • Avoid screens 1 hour before bed
  • Keep your bedroom cool and dark
  • Limit caffeine after early afternoon

Even a few nights of better sleep can significantly reduce twitching eyes.


2. Cut Back on Caffeine

Caffeine stimulates your nervous system and can worsen spasms.

  • Reduce coffee, tea, energy drinks, and soda
  • Try gradually tapering instead of stopping suddenly
  • Switch to decaf in the afternoon

3. Manage Stress

Stress and sleep deprivation often go hand in hand.

Simple stress-reducing strategies include:

  • Deep breathing exercises
  • Short daily walks
  • Stretching or yoga
  • Journaling before bed
  • Meditation apps

Lowering stress often decreases twitching eyes within days.


4. Rest Your Eyes

If screen time is contributing:

  • Follow the 20-20-20 rule: Every 20 minutes, look 20 feet away for 20 seconds.
  • Adjust screen brightness
  • Blink more often
  • Consider artificial tears if you have dry eyes

Dry, strained eyes are more prone to twitching.


5. Apply a Warm Compress

A warm compress can relax eyelid muscles.

  • Use a clean washcloth with warm (not hot) water
  • Place it over closed eyes for 5–10 minutes
  • Repeat once or twice daily

This can improve circulation and soothe irritation.


6. Consider Nutritional Support

If twitching eyes persist, it may be worth reviewing your diet.

  • Ensure adequate magnesium intake
  • Eat leafy greens, nuts, seeds, and whole grains
  • Stay hydrated

Do not start supplements without discussing them with a healthcare professional.


When Twitching Eyes May Be More Serious

Most eyelid twitching is harmless. However, in rare cases, it may signal a more serious condition such as:

  • Blepharospasm (forceful eyelid closure)
  • Hemifacial spasm (involuntary spasms on one side of the face)
  • Neurological disorders (very rare)

You should speak to a doctor if:

  • The twitch lasts more than several weeks
  • Your eyelid completely closes during spasms
  • Other parts of your face start twitching
  • You have drooping of the face
  • You experience changes in vision
  • The eye becomes red, swollen, or produces discharge

These symptoms are uncommon, but they deserve medical evaluation.

If you're concerned about what might be causing your symptoms, Ubie's free AI-powered Eye twitching Symptom Checker can help you identify possible causes and understand whether you should seek medical attention.


How Long Do Twitching Eyes Last?

When caused by lack of sleep, twitching eyes often improve within:

  • A few days of better rest
  • One to two weeks with lifestyle adjustments

If you continue sleeping poorly, however, the twitch may persist or return.

Consistency is key.


Can You Prevent Twitching Eyes?

Yes, in many cases.

Here's a simple prevention checklist:

  • ✅ Get regular sleep
  • ✅ Manage stress
  • ✅ Limit caffeine
  • ✅ Take screen breaks
  • ✅ Stay hydrated
  • ✅ Address dry eyes

Small habits make a big difference.


The Bottom Line

Twitching eyes are usually a sign that your body needs rest. Lack of sleep overstimulates the nervous system and strains the small muscles around your eyelids, leading to annoying but typically harmless spasms.

The most effective treatment is simple:

  • Sleep more
  • Stress less
  • Reduce caffeine
  • Rest your eyes

Most twitching resolves on its own once these factors are corrected.

That said, do not ignore persistent, worsening, or unusual symptoms. If twitching eyes last more than a few weeks, spread to other parts of your face, interfere with vision, or cause full eyelid closure, you should speak to a doctor. While serious causes are rare, it is always better to be cautious with new or unexplained neurological symptoms.

If you are concerned about what your symptoms might mean, consider trying a free online symptom check for guidance—and follow up with a healthcare professional for a proper diagnosis if needed.

Your body often whispers before it shouts. Twitching eyes may simply be a reminder that it is time to rest.

(References)

  • * O'Connor, A. R., & Mian, A. H. (2023). Eyelid Myokymia and Its Association With Stress and Sleep Deprivation: A Case-Control Study. Journal of clinical sleep medicine: JCSM, 19(2), 263–268.

  • * Khan, R. B., et al. (2021). Eyelid Myokymia: A Clinical Review. Current neurology and neuroscience reports, 21(9), 47.

  • * Tan, D. B. W., et al. (2020). A comprehensive review on myokymia and related disorders. Journal of clinical neuroscience, 71, 169–176.

  • * Radeke, M. J., & Radeke, A. R. (2023). Eyelid myokymia: Current perspectives. Survey of ophthalmology, 68(1), 183-195.

  • * Singh, S., et al. (2020). The Impact of Sleep on Neurological and Psychiatric Disorders. Journal of clinical sleep medicine: JCSM, 16(11), 1855–1867.

Thinking about asking ChatGPT?Ask me instead

Tell your friends about us.

We would love to help them too.

smily Shiba-inu looking

For First Time Users

What is Ubie’s Doctor’s Note?

We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.

Learn more about symptoms

Eye twitching

Was this page helpful?

Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.