Why Do I Get Heart Palpitations at Night?

Nighttime heart palpitations usually happen because your body is quiet enough to notice what’s always been there, or because lying down changes how your heart and nervous system interact. Most causes are harmless, but a few deserve attention. Understanding the specific triggers can help you figure out which category yours falls into.

Why You Notice Them More at Night

During the day, your brain filters out an enormous amount of sensory information, including the feeling of your own heartbeat. At night, with fewer distractions competing for your attention, the threshold for sensing your heart drops significantly. A perfectly normal heartbeat can suddenly feel prominent, fast, or irregular simply because nothing else is occupying your awareness. This is one of the most common explanations for nighttime palpitations, and it’s completely benign.

How Your Sleeping Position Plays a Role

Lying on your left side is a surprisingly common trigger. Your heart sits slightly left of center in your chest, and the lower tip (the part that does the heaviest pumping) angles downward and to the left. When you roll onto that side, gravity pulls the heart closer to the chest wall. Meanwhile, the weight of your body against the mattress compresses the rib cage slightly. The combination puts the strongest pumping chamber right up against the inside of your ribs, turning each beat into a noticeable thump.

Position also affects your vagus nerve, a long nerve running from your brain to your abdomen that helps regulate heart rate. Lying on your left side can stimulate this nerve, which sends abnormal electrical signals to the heart and triggers palpitations. If you consistently notice palpitations in one position but not another, this is likely the explanation. Shifting to your right side or onto your back often resolves it immediately.

The Cortisol Surge Before Waking

If your palpitations tend to happen in the early morning hours, cortisol may be the culprit. Your body’s main stress hormone follows a predictable daily cycle, rising sharply in the minutes before you wake up. Research from Imperial College London found that cortisol binds to a specific protein on heart cells, which then moves to a different part of the cell and alters the genes controlling electrical signaling. As those genes change their activity, the electrical impulses telling your heart to beat become less regular and more chaotic. This is why heart rhythm disturbances, including the kind you’d feel as palpitations, are more likely in the early morning than at any other time of day.

Alcohol’s Delayed Effect on Heart Rate

A glass or two of wine with dinner might feel relaxing in the moment, but several hours later, while you’re asleep, your heart is dealing with the aftermath. A large real-world study using wearable heart monitors found that even one extra drink above a person’s usual intake raised resting heart rate during sleep by about 2.4 to 2.8 beats per minute, with a corresponding drop in heart rate variability (a sign that the nervous system is working harder to keep things stable).

Timing matters. Drinking earlier in the evening, such as before dinner rather than after, was associated with measurably better cardiac regulation during sleep. Drinking later pushed those disruptions further into the night. If you wake up at 2 or 3 a.m. with your heart racing, the evening’s alcohol is a likely suspect, even if the amount felt modest.

Low Magnesium and Electrolyte Imbalances

Magnesium helps control the timing of electrical signals in your heart. Specifically, it regulates the “gates” in a key relay point that coordinates when each chamber beats. When magnesium levels are low, those gates open and close too quickly, speeding the heart up and producing the sensation of skipped or extra beats. Magnesium deficiency is very common, partly because modern diets tend to be low in leafy greens, nuts, and seeds where the mineral is most concentrated.

Dehydration overnight can concentrate or deplete electrolytes further, which is why some people notice palpitations more on nights when they haven’t had enough water, have exercised heavily, or have eaten a high-sodium meal. Potassium and calcium also play roles in cardiac electrical signaling, though magnesium deficiency is the most frequent electrolyte-related cause of palpitations.

Sleep Apnea and Oxygen Drops

Obstructive sleep apnea, where the airway repeatedly collapses during sleep, is one of the more serious causes of nighttime palpitations. Each time breathing stops, oxygen levels in the blood drop. This triggers a cascade: the nervous system swings between its “fight or flight” and “rest and digest” modes, carbon dioxide and acid levels in the blood shift, and the heart’s electrical system becomes increasingly unstable. The American Heart Association notes a strong correlation between the severity of these oxygen drops and the frequency of abnormal heart rhythms during sleep.

Sleep apnea is worth considering if your palpitations come with loud snoring, gasping awake, morning headaches, or daytime exhaustion that doesn’t improve with more sleep. It’s one of the few causes on this list where treatment (typically a device that keeps the airway open) can make a dramatic difference in both the palpitations and overall cardiovascular risk.

Blood Sugar Drops During Sleep

For people with diabetes or those prone to blood sugar swings, nocturnal hypoglycemia (low blood sugar during sleep) can trigger palpitations through an indirect but powerful mechanism. When blood sugar falls too low, the brain activates a stress response that floods the body with adrenaline. That adrenaline raises heart rate, increases cardiac output, and can produce noticeable pounding or racing.

What makes nighttime episodes particularly tricky is that the body’s counter-regulatory response is weaker during sleep. You’re less likely to wake up, correct the blood sugar, and move on. Instead, the low blood sugar persists longer, and the nervous system compensates in ways that increase the risk of both abnormally fast and abnormally slow heart rhythms. People on insulin or certain diabetes medications are most susceptible, but reactive hypoglycemia after a high-carbohydrate evening meal can affect others too.

Caffeine, Stress, and Other Common Triggers

Caffeine has a half-life of about five to six hours, meaning half the caffeine from a 3 p.m. coffee is still circulating at bedtime. For people who are sensitive to it, that residual stimulant effect can keep the heart slightly more excitable through the night. The fix here is straightforward: move your cutoff earlier and see if the palpitations follow.

Anxiety and stress deserve mention because they raise baseline levels of adrenaline and keep the nervous system in a heightened state. You may not feel consciously anxious while lying in bed, but if your body has been running on stress hormones all day, the heart can still be responding to that chemical environment hours later. Deep, slow breathing before sleep (particularly exhaling longer than you inhale) activates the vagus nerve in a calming direction and can reduce palpitation frequency for some people.

When Palpitations Signal Something Serious

Most nighttime palpitations are benign, but certain patterns warrant prompt evaluation. A resting heart rate above 120 beats per minute or below 45, palpitations accompanied by chest pain or difficulty breathing, lightheadedness or fainting (especially if you injure yourself falling), and a new irregularly irregular rhythm are all red flags. A family history of sudden cardiac death or unexplained fainting also raises the stakes. Palpitations triggered by exercise, rather than rest, tend to be more concerning than those that appear only when lying quietly in bed.

If your palpitations are brief, occasional, and happen without any of those accompanying symptoms, they are very likely harmless. Tracking when they occur, what position you’re in, and what you consumed that evening can help you identify your personal triggers and, in many cases, eliminate the palpitations entirely.