Waking up with a racing heart or a jolt of panic
Short answer: the usual explanations are a nocturnal panic attack, an apnoea-related arousal, alcohol, acid reflux, or the ordinary pre-waking cortisol rise landing on an already-anxious nervous system. Most are benign and identifiable by their pattern โ but chest pain, breathlessness, fainting, or a first-ever episode is a reason to seek urgent medical assessment, not a sleep-hygiene tip.
Take that exception seriously before reading further. A racing heart at night is very often anxiety, and it is occasionally a cardiac event, and the two can feel similar from the inside. Nobody should be working that out from a website.
When to stop reading this and get help now
Seek emergency care if a racing heart at night comes with chest pain or pressure, pain spreading to the arm, jaw, neck or back, severe breathlessness, fainting or near-fainting, confusion, or a heartbeat that stays fast and irregular after you've been sitting quietly for several minutes.
Also treat a first-ever episode as worth prompt medical attention rather than something to self-diagnose. People who have had nocturnal panic attacks for years can usually recognise one; someone experiencing it for the first time has no baseline, and the conditions that need excluding โ arrhythmias, thyroid problems, certain medication effects โ are excluded by examination and tests, not by reasoning.
If episodes are recurrent, book a non-urgent appointment even if each one passes. A GP can rule out the treatable physical causes cheaply, and knowing they've been ruled out is itself therapeutic if the answer turns out to be anxiety.
Nocturnal panic attacks
A panic attack that begins during sleep, waking the person abruptly into full-blown fear. The physical symptoms are the same as a daytime panic attack โ pounding or racing heart, sweating, trembling, shortness of breath, chest tightness, a sense of unreality, and often a conviction that something catastrophic is happening.
What makes the nocturnal version distinctive is the absence of any trigger. You wake already in it, with no thought or situation to attribute it to, which is exactly why people so often conclude they are having a heart attack. These typically arise out of non-REM sleep rather than out of a dream, so they are not nightmares โ there's no narrative to remember, just the physical surge.
They usually peak within minutes and settle within half an hour, though the adrenaline leaves people wired for much longer, and the fear of another one can make going back to bed genuinely difficult. That secondary fear is the part that turns an isolated event into a pattern of poor sleep. Nocturnal panic responds to the same treatments as daytime panic โ cognitive behavioural approaches have good evidence โ which is a reason to raise it with a clinician rather than endure it.
It's worth distinguishing these from night terrors, where the person is not fully awake, often sits up or cries out, is difficult to console, and typically has no memory of it in the morning. Panic attacks wake you fully and you remember every second.
The cortisol rhythm, and why the small hours are primed for this
Cortisol follows a daily rhythm: lowest in the evening, beginning to climb in the second half of the night, and peaking shortly after waking. That rise is functional โ it's part of how the body prepares to get up.
It also means the small hours are a period of increasing physiological arousal, arriving in a brain that is spending more of that time in lighter sleep. Add a stressful period, and the ordinary rise sits on top of an already-elevated baseline. The result is that you surface more easily and surface into a body that is already somewhat activated, which anxious thinking then interprets and amplifies. A mildly fast heartbeat gets noticed, the noticing produces alarm, and the alarm produces a genuinely fast heartbeat.
This loop is worth understanding because it explains the common experience of waking with a pounding heart and no identifiable cause. The cause is the rhythm you have every night, meeting a threshold you've temporarily lowered.
Alcohol
One of the most reliable causes and the easiest to test. As alcohol is metabolised, the body moves into a rebound state with increased sympathetic nervous system activity โ elevated heart rate, higher blood pressure, sweating, and lighter, more fragmented sleep in the second half of the night. That rebound peaks in exactly the window where you're already sleeping shallowly.
Alcohol also dehydrates, disturbs blood sugar regulation, relaxes the muscles of the upper airway, and increases reflux. It stacks with almost every other cause on this page. If the episodes follow drinking nights and don't happen otherwise, you have your mechanism, and a two-week trial without alcohol will confirm it more cheaply than anything else you could do. Alcohol and sleeping through your alarm follows the same rebound through to the morning, which is where most people notice it second.
Acid reflux
Lying flat removes gravity's help in keeping stomach contents where they belong. Reflux at night can produce chest burning that is easy to mistake for a cardiac symptom, and it can also trigger a sudden arousal with choking, coughing or a gasp โ followed by a racing heart that is a consequence of the startle rather than its cause.
The clues are a late or large evening meal, alcohol, a sensation of burning or sour taste, hoarseness or a persistent morning cough. Practical adjustments โ finishing eating a few hours before bed, raising the head of the bed, avoiding alcohol close to bedtime โ often help, but recurring symptoms deserve a proper look rather than indefinite self-management, partly because the chest-pain overlap is genuinely hard to untangle.
Apnoea-related arousals
When breathing is interrupted during sleep, the brain triggers an arousal to reopen the airway, and that arousal comes with a surge of sympathetic activity โ a spike in heart rate and blood pressure. Most of these are too brief to remember. Occasionally one wakes you fully, and you surface gasping with your heart hammering, having no idea why.
The pattern to look for is waking with a gasp or choking sensation rather than with a sense of dread, alongside loud snoring, unrefreshing sleep and daytime sleepiness. This one matters more than the others on this page, because untreated sleep-disordered breathing carries cardiovascular consequences over time and is diagnosed by a sleep study rather than inferred โ sleep apnoea and mornings sets out why it's worth pursuing.
Anxiety, and the anticipation loop
Generalised anxiety doesn't only operate in daylight. Elevated baseline arousal makes lighter sleep more likely, makes awakenings more likely to be interpreted as threatening, and makes returning to sleep harder. Over weeks, the pattern becomes self-sustaining: you go to bed apprehensive about waking badly, and the apprehension raises the arousal that produces the waking.
That loop appears in a milder form around alarms specifically โ waking repeatedly through the night with a jolt, checking the clock, confirming you haven't overslept. It's the same anticipatory mechanism aimed at a smaller target, and alarm anxiety and waking up to check the clock covers what breaks it.