Anxiety and a heart racing when trying to sleep: why it happens, and what helps
By Jack Murphy
Founder, Wobble
Jack lived with mental health struggles for over a decade before finally reaching out for support. He founded Wobble to make that first step easier for people who, like he was, are not ready to commit to traditional therapy. Jack is not a clinician; all techniques and guidance in this article come from NHS, NICE, and BACP sources.
Connect on LinkedInIf you are in crisis or feel unsafe, please call 999 or go to A&E. For urgent mental health support, call NHS 111 and select the mental health option. Samaritans (116 123, free, 24/7) and Shout (text 85258) are always available.
Read this first
Anxiety makes your heart race when you try to sleep because your body releases stress hormones such as adrenaline that raise your heart rate, and lying still in a dark, quiet room makes a heartbeat you would ignore in the daytime impossible to miss. The NHS lists a faster or more noticeable heartbeat among the physical symptoms of anxiety, and it lists heart palpitations, the general term for a heartbeat that becomes more noticeable, as common and usually harmless, with stress and anxiety among the most common causes.
That is the reassuring version, and for most people it is the true one. The less comfortable version is that a racing heart is also a symptom your GP would want to know about if it keeps happening, so this piece takes both seriously. It covers why it happens at bedtime in particular, how to tell when it needs checking, and what helps in the moment and over the following weeks. It is not a diagnostic tool, and everything in it is drawn from NHS self-help material and UK mental health charities including Mind. If a racing heart is one piece of a wider pattern of dread, restlessness and broken nights, the fuller picture is in sleep anxiety symptoms, which this article sits underneath.
If your mind will not switch off, tell a therapist what it is circling. You get a personal video back, usually within hours.
Wobble is on-demand mental health support from qualified UK therapists. Describe what is going on and get a personal video back with practical next steps, usually within hours. Your first Wobble is £9.99, usually £14.99.
What a racing heart in bed actually feels like
You get into bed, the light goes off, and within a few minutes you can hear your own pulse. Sometimes it is fast. Sometimes it is not especially fast but it is loud, thudding in your chest or throat in a way it never does at your desk. Sometimes it skips or flutters, which is somehow worse. And once you notice it you cannot stop noticing it, so you lie there monitoring your own heartbeat, which is not a state anyone falls asleep in.
Nothing in that is unusual. The NHS describes palpitations as a heartbeat that feels racing, pounding, fluttering or irregular, felt in the chest, neck or throat, lasting seconds, minutes or longer, and its list of common causes reads like a description of a bad week: stress and anxiety, lack of sleep, alcohol, caffeine and nicotine. A faster or more noticeable heartbeat also sits on the NHS list of physical anxiety symptoms, alongside sweating, feeling hot, shaking and breathlessness, with not being able to sleep on its list of mental ones.
Why does my heart race when I try to sleep?
Your heart races when you try to sleep because anxiety triggers stress hormones that speed your heart up, and bedtime is the first moment all day that you are still and quiet enough to feel it. The NHS explains that when you feel anxious or scared your body releases stress hormones such as adrenaline and cortisol, which can cause physical symptoms including an increased heart rate and sweating.
During the day that response is buried under movement and noise, and a slightly elevated heart rate is nothing you would clock. In bed there is no competition for your attention. The NHS Every Mind Matters sleep guidance describes how stress and anxiety can leave the body feeling more alert and the mind full of worrying thoughts, close to the opposite of the state sleep needs, so the same heart that was quietly working hard all day is suddenly the only thing happening in the room.
Then the loop starts. You notice the pounding, noticing it makes you uneasy, and unease is more adrenaline, which is more pounding. Some people also start worrying about the heart itself, which adds a second, sharper layer of fear on top of the first. None of that means anything is wrong with your heart. It means your alarm system has found the one time of day when nothing can distract it. If the surge tends to arrive right at the edge of sleep rather than the moment you lie down, that specific jolt is covered in that rush of anxiety when falling asleep.
Is a racing heart at night dangerous?
On its own, a racing heart caused by anxiety is not dangerous, and the NHS says palpitations are common and not usually a sign of anything serious. Even a full panic attack, the most intense version of this experience, is described by the NHS as frightening but not dangerous, and one usually lasts 5 to 20 minutes.
That said, this is the one place in the sleep cluster where the honest answer includes a proper caveat, because the NHS is specific about when a noticeable heartbeat needs checking. Call 999 or go to A&E if your heart is racing and it does not go away, or if it comes with chest pain, shortness of breath, or feeling faint or fainting. If you had those symptoms earlier but they have now stopped, the NHS advises asking your GP surgery for an urgent appointment or calling 111. And see a GP, without urgency but without putting it off, if palpitations keep coming back or are happening more often, if they last longer than a few minutes, or if you have a heart condition or a family history of heart problems.
If "keep coming back" describes every night this month, a GP appointment is the right next step, not an overreaction. The NHS notes that palpitations can occasionally be caused by other health conditions, and a GP may arrange a simple test such as an ECG to find the cause. Most of the time the answer is that your heart is fine and the anxiety is the thing to work on, and hearing that from a doctor rather than a search engine at 1am is worth a great deal to an anxious brain. Wobble's Clinical Lead, James Penney, an NCPS Accredited Psychotherapeutic Counsellor, would say what any therapist would: rule out the physical first, then the anxiety becomes something you can actually work with.
What helps in the moment
The aim at midnight is not to force sleep. It is to bring the alarm down far enough that sleep becomes possible again. These are the building blocks that NHS and Mind self-help describe, applied to a heart that will not settle.
Slow your breathing. The NHS describes a calming breathing technique for stress, anxiety and panic that you can do lying down: let the breath flow comfortably down into your belly without forcing it, in through your nose and out through your mouth, gently and regularly, counting steadily from 1 to 5 on each in-breath and out-breath if that helps, and keeping it going for at least 5 minutes. You are not trying to slow your heart directly. You are giving your nervous system a steady signal that the emergency is over, and the heart tends to follow.
Let the heartbeat be there. Mind suggests that when a difficult thought or feeling arrives, rather than trying to fix it, you notice it, accept that it is there and that it feels distressing, and then bring your focus to the present moment using your senses. That applies to a heartbeat too. Fighting it is more attention, and attention is what feeds it. The weight of the duvet, the sound of the room, the temperature of the air on your face all give your focus somewhere else to sit.
Put the worry somewhere. If the racing arrives attached to a specific worry, Mind suggests writing worries down and keeping them in a particular place, a notebook by the bed does the job, rather than turning them over in your head. You are not solving it now. You are telling your brain it has been logged and can wait for daylight.
Stop lying there fighting. The NHS insomnia self-help advises only going to bed when you are sleepy. If your heart has properly woken you up and you have been lying tense for a long stretch, getting up briefly, keeping the lights low and doing something quiet until you feel sleepy again takes the pressure off, and pressure is the fuel for the whole loop.
Want a personal response?
Wobble connects you to a qualified UK therapist without the commitment of a full course of therapy. Describe what is going on and get a personal video back, usually within hours. First Wobble £9.99.
The daytime habits that set it up
Most of what happens to your heart at 11pm was set up long before you got into bed, and the NHS list of palpitation triggers overlaps almost exactly with its list of things that wreck sleep. It advises not smoking or drinking alcohol, tea or coffee for at least 6 hours before bed, and the Every Mind Matters guidance adds that alcohol can make you feel sleepy at first but leads to poorer sleep later in the night. Caffeine, nicotine and alcohol all sit on the NHS list of common palpitation causes, so an evening coffee or a nightcap is doing double damage. So is lack of sleep itself, which is on the same list, meaning a bad night makes a racing heart the next night more likely, not less.
The rest of the NHS insomnia guidance applies too: relax for at least an hour before bed, keep the bedroom dark and quiet, get up at the same time every day rather than sleeping in after a rough night, put devices away before bed, and exercise regularly in the day but not in the 4 hours before it. And Mind suggests setting aside a specific time earlier in the day to focus on your worries and write them down, so that by bedtime they have less unfinished business to bring you.
This take-the-pressure-off-first, then-take-one-clear-step logic is also how the Wobble response framework works, a structured framework built for short, practical, single-response support: you describe what is going on, and a therapist sends back one clear, personal piece of help rather than an open-ended process.
When to see your GP, and when not to wait
Two separate routes, because there are two separate questions. For the heart itself, follow the NHS guidance above: 999 or A&E for a racing heart that will not stop or comes with chest pain, breathlessness or faintness, and a GP appointment if palpitations keep returning, are getting more frequent, last longer than a few minutes, or you have a heart condition or family history.
For the anxiety and the sleep, the NHS advises seeing a GP if changing your sleeping habits has not helped, if you have had trouble sleeping for months, or if it is affecting your daily life in a way that makes it hard to cope. A GP will look for the cause and may offer cognitive behavioural therapy, which the NHS says can help change the thoughts and behaviours that keep you from sleeping. If you are 18 or over (16 or over in some areas) you can refer yourself directly to an NHS talking therapies service in England without going through a GP, though waits vary widely. A BACP, UKCP, BABCP, BPS or NCS-registered therapist can help privately, and Counselling Directory (counselling-directory.org.uk) lets you filter for experience in anxiety and sleep. If your nights are hard in a broader way than the heartbeat alone, anxiety at night looks at why the whole evening can feel worse than the day.
Try Wobble for £9.99
On-demand mental health support from qualified UK therapists. Describe what is going on, get a personal video back usually within hours. First Wobble £9.99, then from £8.75 with a plan.
Quick summary
A heart racing when you try to sleep is usually anxiety doing what anxiety does: the NHS explains that stress hormones such as adrenaline raise your heart rate, and lying still makes it impossible to ignore. Palpitations are common and usually harmless, with stress, anxiety, lack of sleep, caffeine and alcohol among the most common causes. The caveat matters: call 999 if it will not stop or comes with chest pain, breathlessness or faintness, and see your GP if it keeps coming back, lasts more than a few minutes, or you have a heart condition or family history. In the moment, breathe the way the NHS describes, let the heartbeat be there rather than fighting it, write the worry down, and get up briefly rather than lying tense. In the day, cut caffeine and alcohol in the 6 hours before bed, keep a fixed wake time, and give your worries a slot long before bedtime. If it is most nights or affecting your life, your GP and NHS talking therapies are the proper next step. You do not have to sort this alone.
For the wider picture, see sleep anxiety symptoms. For the jolt that hits right at the edge of sleep, see that rush of anxiety when falling asleep. For practical help across the whole night, see how to sleep with anxiety.
Sources and further reading
- NHS: Anxiety, fear and panic (nhs.uk)
- NHS: Heart palpitations (nhs.uk)
- NHS: Insomnia (nhs.uk)
- NHS: Breathing exercises for stress (nhs.uk)
- NHS: Every Mind Matters, Sleep problems (nhs.uk/every-mind-matters)
- NHS Talking Therapies (England): nhs.uk
- Mind: How to manage anxiety and worry (mind.org.uk)
- BACP: bacp.co.uk
- Counselling Directory: counselling-directory.org.uk
- Samaritans: 116 123 (samaritans.org)
- Shout: text 85258 (giveusashout.org)
This article is for information only and does not replace advice from a qualified medical professional. If a racing heart, anxiety or sleep problems are affecting your daily life, please speak to your GP or contact NHS 111. If you are in crisis, please call 999 or go to A&E.
Frequently asked questions
Can lack of sleep itself make my heart race at night?
Yes. The NHS lists lack of sleep among the common causes of heart palpitations, alongside stress and anxiety, caffeine, alcohol and nicotine. That means a run of bad nights can make a noticeable heartbeat more likely the next night, which is one reason the loop is worth breaking early.Source: NHS: Heart palpitations
Can I get heart palpitations from anxiety even when I do not feel worried?
The NHS describes palpitations as common and usually harmless, with causes that include stress and anxiety but also lack of sleep, caffeine, alcohol, nicotine and some medicines. So a racing heart can appear without an obvious worry attached, and if it keeps coming back a GP is the right person to check the cause.Source: NHS: Heart palpitations
What will a GP do if I go about my heart racing at night?
The NHS says a GP may arrange an electrocardiogram (ECG), a simple test using small pads on the skin, to help find the cause, and that palpitations often do not need treatment at all. If a heart problem is found you may be referred to a specialist, and if anxiety is the cause the GP can talk through support options with you.Source: NHS: Heart palpitations
Should I get up or stay in bed when my heart is racing at night?
The NHS insomnia self-help advises only going to bed when you feel sleepy, so if you have been lying awake and tense for a long stretch, getting up briefly and doing something quiet in low light until you feel sleepy again is a reasonable move. Slow breathing while you are up or once you are back in bed can help the alarm settle.Source: NHS: Insomnia, NHS: Breathing exercises for stress
Does an evening coffee or a nightcap make a racing heart at bedtime worse?
The NHS lists caffeine, alcohol and nicotine among the common causes of palpitations and advises not drinking alcohol, tea or coffee for at least 6 hours before bed. Its Every Mind Matters guidance adds that alcohol can make you feel sleepy at first but leads to poorer sleep later in the night.Source: NHS: Heart palpitations, NHS: Insomnia, NHS: Every Mind Matters, Sleep problems
Related reading
Need support right now?
Share what you are going through and receive a personalised video response from a qualified therapist within hours.
Send your first Wobble