Several things, such as caffeine and stress, can cause involuntary muscle spasms at night. Here’s what to know about twitching in your sleep.

Have you ever suddenly been awoken by a quick jerk or twitch in your body? Maybe you have seen this twitching in a sleeping baby or your partner.

The name for twitching in your sleep is sleep myoclonus.

This sudden, uncontrollable movement or “jerking” of muscles is quite common and affects up to 70% of people of all ages and genders.

These muscle jerks can be unnoticeable or mild, but for some people can be intense enough to wake you up. While the exact cause is unknown, some factors may contribute to why you may twitch in your sleep.

If twitching in your sleep is becoming bothersome, there are a few things you can do to reduce those nighttime spasms.

If you’ve ever been close to falling asleep then suddenly jerk awake, you are experiencing a type of sleep myoclonus.

Sleep myoclonus also called “hypnic myoclonus,” is defined by the National Institutes of Health as a type of myoclonus — non-rhythmic, sudden, and involuntary movement — that occurs during sleep or sleep transitions. It’s most common as you drift off to sleep.

These sudden contractions of one or more of your body parts are also known as “hypnic jerks” or “hypnagogic jerks,” which are types of sleep myoclonus.

A hypnagogic jerk is a sudden, involuntary twitch that occurs as you’re falling asleep, while a hypnic jerk is the same phenomenon, but occurs as you awaken.

While the names may differ, they all refer to the same thing, an involuntary muscle twitch.

While many people aren’t bothered by and don’t need treatment for twitching in their sleep, for others, it may be a sign of a sleep condition that needs attention.

Signs and symptoms

The symptoms of sleep myoclonus occur during sleep and sleep transitions, such as falling asleep, waking up, or right before deep REM sleep.

Myoclonus causes involuntary muscle twitches in one or more muscle groups. These movements may include:

  • localized muscles spasms
  • widespread muscle spasms
  • sudden jerking of a specific part of the body
  • brief, shock-like muscle twitches

This twitching may also be called:

  • spasms
  • jerks
  • shakes
  • contractions

The exact cause of sleep twitches is unknown. But a study explored the connection between twitching and sleep and cited the following factors that can increase your risk of twitching while you sleep:

Anxiety and stress

Stress can make it difficult to unwind at night, increasing the likelihood of hypnic jerks while you sleep.

Physical stress

If you exercise before bedtime, you’re putting physical stress on your body. It can have a stimulating effect and may increase the frequency of twitching.

Caffeine intake

Drinking too much caffeine before bedtime may also be the culprit. Caffeine is a stimulant and drinking it close to or right before you sleep can make it difficult for your body and brain to fully relax.

Stimulates

Stimulants, such as drugs or alcohol, can also increase twitching while you sleep. Nicotine is a stimulant, making nighttime muscle spasms more likely in people who use cigarettes or vapes. A 2019 study suggests smoking causes poor sleep quality.

Sleep or neurological disorder

For most people, twitching isn’t a sign of an underlying condition. But in some cases, nighttime jerks can be a symptom of a sleep disorder, such as restless legs syndrome (RLS), or a nervous system disorder, such as:

  • Parkinson’s disease
  • Alzheimer’s disease
  • multiple sclerosis (MS)
  • epilepsy

There are a few things in your control that may prevent twitching while you sleep. You can:

  • Reduce caffeine intake: Avoid caffeine in the late afternoon and evening to give yourself the best chance of minimizing twitches or jerks while you sleep.
  • Avoid stimulants: Avoiding alcohol, drugs, or other stimulants like nicotine before bedtime may help prevent twitching throughout the night.
  • Exercise earlier in the day: Exercise is great for your body, but consider doing your exercise earlier in the day to reduce involuntary twitches throughout the night. A 2017 study suggests daytime physical exercise can help you sleep better.
  • Practice relaxation techniques: To help bring about your body’s relaxation response and minimize twitching you can practice breathing techniques or use guided imagery. They may help you calm your body and mind before bedtime.

Treatment

Treatment for sleep myoclonus is only needed if it interferes with sleep or disrupts your quality of life. If the condition is serious, then your doctor may prescribe a medication, such as tetrabenazine, which is typically used to treat movement disorders like Huntington’s disease.

The sudden jerk that you feel as you’re falling asleep or during sleep is called sleep myoclonus. It can also be referred to as a hypnic jerk or hypnagogic jerk depending on its timing.

There is no definitive answer to why you may twitch in your sleep. However, a few factors that may contribute are:

  • being stressed or having anxiety
  • stimulants (alcohol, drugs, nicotine)
  • drinking too much caffeine close to bedtime
  • exercising close to bedtime

For most people, nighttime twitches are a mild nuisance. But if they’re disrupting your life or preventing you from sleeping, consider reaching out to your doctor or seeking a board certified sleep physician to figure out a treatment that’s right for you.