The short answer: Waking up with your heart pounding is almost always an adrenaline surge, not a heart attack. The usual causes are obstructive sleep apnea, a nocturnal panic attack, alcohol the evening before, and low blood sugar in people who take insulin. Thyroid disease and brief arrhythmias such as atrial fibrillation are less common but treatable. Get urgent care if the episode comes with chest pain, fainting, or breathlessness at rest.

What happens to my heart while I sleep?

Your heart rate normally falls during deep, non-REM sleep. REM sleep is different. The StatPearls chapter Physiology, Sleep Stages describes REM as a stage of increased and variable pulse and blood pressure.

REM periods also lengthen as the night goes on. The first cycle lasts about 10 minutes, and the last can run up to an hour. That is one reason these episodes cluster in the early morning.

Anything that pulls you out of sleep abruptly causes an arousal, which releases a short burst of sympathetic nervous system activity. Your pulse climbs for a minute or two, then settles. A single episode that calms on its own is rarely dangerous.

Count your pulse while it is happening. Note whether it is fast but steady, or fast and irregular. That one detail changes what a doctor looks for.

Could obstructive sleep apnea be the cause?

This is the cause people miss most often. In obstructive sleep apnea, the upper airway collapses repeatedly during sleep. A review in Annals of Thoracic Medicine describes the cycle: airflow stops, oxygen falls, you keep trying to breathe against a closed airway, and the episode ends with an arousal from sleep.

That sequence produces a characteristic rhythm. The vagus nerve slows the heart during the apnea. The arousal then brings a sympathetic rebound, and the heart rate jumps. Wake during one of those rebounds and your heart is already racing.

The NHLBI lists the clues: breathing that starts and stops, loud snoring, gasping for air, dry mouth, headaches, nighttime urination, and daytime sleepiness. Ask whoever sleeps next to you, because most people cannot report their own apneas.

Apnea is also tied to arrhythmia at night. In the Sleep Heart Health Study, 228 adults with severe sleep-disordered breathing were compared with 338 adults without it. Atrial fibrillation was found in 4.8% versus 0.9%. After adjustment, severe sleep-disordered breathing carried four times the odds of atrial fibrillation (odds ratio 4.02, 95% CI 1.03 to 15.74).

A Mayo Clinic cohort of 3,542 adults referred for sleep studies adds a caveat. Over a mean 4.7 years, 133 developed atrial fibrillation. In people under 65, the drop in overnight oxygen saturation predicted it independently. In people aged 65 and over, neither obesity nor apnea did. If your sleep is broken most nights, insomnia.md covers the sleep side, and night sweats often come with the same awakenings.

Is it a nocturnal panic attack?

Nocturnal panic means waking from sleep already in a state of panic. It is not a nightmare, and people often cannot recall any dream. A study in the Journal of Nervous and Mental Disease states that nocturnal panic occurs in 18% to 45% of panic disorder patients.

That same study compared 51 patients who had nocturnal panic with 41 who did not, and found no evidence that it is a more severe form of the disorder. A separate study of 101 untreated patients found most nocturnal attacks happened in the first third of the night.

Telling panic from a cardiac event is harder than most articles admit. Both bring a fast heartbeat, sweating, and a sense of dread. Panic usually peaks fast, carries intense fear, and eases over minutes. An arrhythmia more often feels irregular, or it simply keeps going. If chest pain is part of it, read our guide on chest pain and when to worry, and get a first episode checked.

Could alcohol, caffeine, or low blood sugar explain it?

Alcohol is the most fixable trigger on this list. In a dose-response laboratory study published in Sleep, 26 healthy adults spent three monitored nights with low-dose alcohol, high-dose alcohol, or placebo before bed. Drinking before sleep increased nocturnal heart rate, suppressed total and high-frequency (vagal) heart rate variability, reduced baroreflex sensitivity, and increased sympathetic activity. The effects were stronger at the higher dose.

A second laboratory study tested binge drinking, defined there as 4 to 5 drinks within 2 hours. It reduced heart rate variability in stage N2, slow-wave, and REM sleep. The body does not rest normally on a drinking night, even when sleep looks intact.

The arrhythmia link is real and specific. In a 4-week case-crossover study of 100 people with paroxysmal atrial fibrillation, an episode carried twice the odds of one drink (odds ratio 2.02) and over three times the odds of two or more drinks (odds ratio 3.58) in the preceding 4 hours. The HOLIDAY trial then infused alcohol to 0.08% blood alcohol in 100 patients during ablation, shortening the pulmonary vein refractory period by about 12 milliseconds. It found no rise in inducible atrial fibrillation, so it shows a mechanism, not an attack.

Caffeine lingers longer than people expect. The StatPearls Caffeine chapter puts the half-life in the average adult at roughly 5 hours, so a 4 p.m. coffee still has caffeine on board near midnight.

Low blood sugar overnight matters if you take certain diabetes medicines. NIDDK names insulin, sulfonylureas, and meglitinides as the usual causes. Signs of a low during sleep include nightmares, sweating enough to dampen pajamas or sheets, and waking tired or confused. MedlinePlus lists a fast or pounding heartbeat, sweating, and shaking among hypoglycemia symptoms.

Which conditions cause a racing heart at night?

Several conditions raise your baseline heart rate, so any awakening feels dramatic.

  • Hyperthyroidism. MedlinePlus lists pounding or racing heartbeat (palpitations) and sleep problems among the common symptoms. A TSH blood test settles the question.
  • Atrial fibrillation and SVT. The NHLBI defines paroxysmal atrial fibrillation as a brief event that usually stops within 24 hours, though it may last up to a week. Because it comes and goes, a clinic ECG is often normal, and an ambulatory monitor is what catches it.
  • Anemia. A rapid heart rate, breathlessness on mild activity, and tiredness are the classic set, per MedlinePlus.
  • Perimenopause. The MedlinePlus menopause page lists hot flashes, night sweats, heart pounding or racing, irregular heartbeat, and insomnia. Hot flashes are usually worst in the first 1 to 2 years.
  • Fever, stimulants, and medicines. The MedlinePlus palpitations page names fever, caffeine, nicotine, heavy alcohol use, diet pills, stimulant drugs, and decongestants such as phenylephrine or pseudoephedrine. Asthma and blood pressure medicines are on it too.

Dehydration and reflux get blamed often. Treat both as theories unless they line up with the episodes every time.

When should I see a doctor?

MedlinePlus gives clear emergency criteria for palpitations. Call 911 for loss of consciousness, chest pain, shortness of breath, unusual sweating, or dizziness and lightheadedness. The NHLBI puts it plainly: if symptoms are very serious, such as difficulty breathing or chest pain, seek emergency medical care.

Book a regular appointment, not an emergency visit, if any of these apply:

  • Your pulse stays above 100 at rest, without exercise, anxiety, or fever.
  • The beat feels irregular, not just fast.
  • Episodes are new, more frequent, or different from before.
  • You have known heart disease or heart risk factors.
  • Your partner reports snoring, gasping, or pauses in your breathing.

Bring two weeks of notes: the time, your counted pulse, whether the beat was regular, what you drank, and when you last ate. Expect an ECG, a thyroid panel, and a blood count, plus an ambulatory monitor or sleep study if needed. Our guide to warning signs worth a doctor visit covers how to rank symptoms.

The bottom line

Most people who wake with a racing heart have a benign adrenaline surge. Sleep apnea, anxiety, and the evening's drinks explain a large share of them. The pattern matters more than the intensity. Brief, regular, self-settling episodes with an obvious trigger are reassuring. Irregular beats, sustained fast rates, fainting, or chest pain need evaluation.

Last updated: September 2026. This article is for informational purposes only and does not constitute medical advice. Talk to a clinician about a racing heartbeat that wakes you from sleep, and call emergency services for chest pain, fainting, or breathlessness at rest.