Hypnic jerks or nocturnal panic attacks could jolt you awake in a state of panic. Whatever the cause, there are ways to manage anxiety at night.

If you wake up at 2 a.m. in a panic (and it’s not because you had too much caffeine before bed), you may be experiencing a nighttime or nocturnal panic attack.

Nighttime panic attacks can feel incredibly similar to daytime panic attacks — with rapid, short breaths and a racing heart rate.

When you wake up from sleep in a state of panic, it could also be caused by other things like hypnic jerks. No matter the cause, you can take steps to relieve distress and symptoms.

Hypnic jerks are involuntary muscle contractions that some people experience as they’re falling asleep. They usually occur during the transitions between your sleep-wake cycle.

These twitches or “hypnic jerks” are pretty common, often mild, and even unnoticeable. However, sometimes these spasms may be strong enough to startle you or jolt you awake.

A 2016 study found that hypnic jerks are “highly sporadic and affect all ages and both sexes with prevalence between 60% and 70% in the general population.”

There’s a good chance these “jerks” or “twitches” have happened to you, and you may not have known it!

More than hypnic jerks

If your nighttime jerking or jolting is accompanied by feelings of distress, there may be more at play.

Panic disorder is an anxiety disorder that’s characterized by repeated panic attacks and a fear of having them. Authors from a 2013 study noted that 18% to 45% of people with panic disorder had nocturnal panic attacks.

Though panic attacks during your waking hours can develop quickly, they usually don’t jolt you awake in a second like the ones during sleep.

Experts are still unsure what exactly causes someone to have panic attacks. However, there are a few things that may contribute to someone having nocturnal panic attacks.

This includes:

  • having a family or personal history of panic attacks
  • living with certain conditions, such as anxiety or depression
  • experiencing traumatic life events
  • changes to your brain chemistry (hormonal or from certain medications)
  • feeling stressed

As with the more well-known daytime panic attacks, nighttime attacks can occur without any reason or warning. But there’s one different symptom.

Unlike waking panic attacks, sleep terrors, or nightmare disorder, in a nocturnal panic attack, you’re awoken from sleep every time.

Other common symptoms may occur during waking or nighttime panic attacks, including:

Panic attacks and anxiety — whether during the day or at night — can feel frightening, but they’re not dangerous.

One of the most stressful things about nighttime panic is that you just don’t know when it’s going to happen, so you feel like you can’t prepare. There are actually several things you can do to help manage your anxiety before and in the moment, so you can get back to sleep.

Practice mantras

A mantra is a helpful saying you use to affirm yourself when needed. When nighttime panic arises, you could try saying mantras to help calm down so you can go back to sleep.

Dr. Kathy HoganBruen, clinical psychologist and founder of District Anxiety Center, suggests the following mantras:

  • “Panic is uncomfortable but not dangerous.”
  • “This is my body’s hardwired reaction to stress, but just like a faulty or very sensitive smoke detector, the alarm going off doesn’t necessarily signal any true danger or emergency.”
  • “Now is the time to sleep, and tomorrow is the time to address any pressing issues.”

Try mindfulness

Mindfulness is a technique where you’re aware of what is presently happening in your body and mind without any judgment.

“Do a body scan from head to toe to notice and feel sensations and thoughts, but without deeming them troubling. Like a fly on the wall, just observe,” says HoganBruen.

Instead of letting your mind spin out of control, you can mindfully focus on the present moment without worrying about things that just happened or haven’t happened yet.

You may want to try a meditation app that has sleep meditations, which can mindfully guide you back to sleep.

Focus on your breath

If you’ve ever had a panic or anxiety attack before, then you know that regulating your breathing isn’t easy when you’re panicking.

But by leveraging deep breathing exercises for anxiety, you can get your nervous system back to a state of calm which can help with that fight-or-flight response you’re going through and thus help you sleep, explains HoganBruen.

Try CBT

Dr. Bryan Bruno, medical director for Mid City TMS in New York, suggests cognitive behavioral therapy (CBT), a type of talk therapy. He says, “This form of psychotherapy helps patients confront their fears and anxieties in a controlled environment.”

“Therapists may also offer tips for better sleep hygiene and coping mechanisms to control or de-stress after a nocturnal anxiety attack,” he explains.

Experiencing nocturnal panic attacks can be just as intense and scary as daytime panic attacks, but with the added suddenness of waking you up.

But whether awake or asleep, panic attacks are not dangerous. You can use several coping tools to get through the panic and get back to what you were doing — like sleeping.

You could:

  • practice mantras
  • try mindfulness
  • focus on your breath

If nighttime panic attacks are affecting your quality of life, you may want to consider speaking with a mental health professional or sleep specialist. Their knowledge and experience can help you find tools and treatments that will work best for you.