Most of the time, shaking or twitching when you lie down is caused by hypnic jerks, involuntary muscle contractions that happen as your brain transitions from wakefulness to sleep. Up to 70 percent of adults experience them at some point, and they are completely harmless. But “shaking when I lie down” can describe several different sensations, and not all of them trace back to the same cause. Depending on whether the shaking is a single jolt, a rhythmic trembling, a buzzing vibration you feel but nobody can see, or a restless urge to move your legs, the explanation and the appropriate response can be quite different.
Hypnic Jerks and the Sleep-Wake Transition
The most common version of this experience is the hypnic jerk, sometimes called a sleep start or hypnagogic jerk. You are drifting off, your muscles are relaxing, and then your body suddenly jerks, sometimes violently enough to wake you up. It can feel like you are falling or like you got an electric shock. The jerk is involuntary, brief, and usually affects just one side of the body or one limb, though it can involve the whole body.
Hypnic jerks are considered a normal part of falling asleep, not a disorder. They appear to originate from sudden bursts of activity in the brainstem’s reticular formation, a region that helps regulate the transition between waking and sleeping. During that transition, the system is unstable. Your brain is shutting down voluntary muscle control while your body is still partially alert, and sometimes that handoff misfires, producing a quick involuntary contraction.1PubMed Central. Hypnic Jerks, Major Depressive Disorder, and Antidepressant Use: A Possible Relationship
Certain things make hypnic jerks more frequent and more intense. Caffeine and other stimulants keep the brain’s arousal systems running hotter, making the sleep-wake transition rockier. Physical exhaustion, irregular sleep schedules, and emotional stress all seem to increase them. If you have been noticing more jerks than usual, those are the first things worth examining before looking at medical causes.
What Happens to Your Cardiovascular System When You Lie Down
Some people describe a shaking, trembling, or pounding sensation that seems to come from inside their chest or torso shortly after lying down. This often has nothing to do with muscles at all. When you shift from standing or sitting to lying flat, gravity stops pulling blood into your legs, and a significant volume of blood redistributes back toward your heart and upper body. In the opposite direction, standing up can shift several hundred milliliters of blood away from the central body toward the lower limbs, enough to temporarily reduce the amount of blood returning to the heart and drop blood pressure.2Physiology & Behavior. Functional near-infrared spectroscopy based blood pressure variations and hemodynamic activity of brain monitoring following postural changes: A systematic review
Lying down reverses that process. The sudden increase in blood returning to the heart can cause it to beat more forcefully for a few moments. If you are lying still in a quiet room, especially on your left side, you can feel that heartbeat through your chest wall and mattress. The sensation can mimic shaking or vibrating, particularly if your heart rate is elevated from anxiety, caffeine, or dehydration. For most people this settles within a few minutes as the cardiovascular system adjusts. If the pounding feeling persists, is accompanied by a racing pulse, or happens every time you lie down, it is worth mentioning to a doctor, because persistent palpitations can sometimes point to an arrhythmia or a thyroid issue.
Restless Legs Syndrome and Periodic Limb Movements
If the shaking you feel is specifically in your legs, and it comes with an uncomfortable urge to move them, restless legs syndrome (RLS) is a strong possibility. RLS is characterized by an irresistible need to move the legs, typically accompanied by creeping, crawling, or tingling sensations deep inside the limbs. The symptoms show up at rest and tend to be worst at night and at bedtime, which is exactly when you are lying down trying to sleep.3Parkinsonism & Related Disorders. Restless legs syndrome and its treatment by dopamine agonists
Alongside the urge to move, many people with RLS also experience periodic limb movements: repetitive, involuntary jerking or twitching of the legs during rest or sleep. A bed partner may notice the legs kicking or jerking rhythmically, often every 20 to 40 seconds, in clusters that can last for minutes to hours. Unlike hypnic jerks, which are a single event as you fall asleep, periodic limb movements tend to repeat in a pattern and can continue through the night, fragmenting sleep even if you don’t fully wake up.3Parkinsonism & Related Disorders. Restless legs syndrome and its treatment by dopamine agonists
RLS affects roughly 5 to 15 percent of the general population, depending on how strictly you define it, and it becomes more common with age. Iron deficiency is one of the best-studied triggers. If you have symptoms that match this description, a doctor can check your ferritin levels. In many cases, correcting low iron stores reduces or eliminates the symptoms. When iron is not the issue, dopamine-related medications are the standard treatment, though they come with their own complications over time.
Internal Tremors and the Feeling of Vibrating
Some people describe a sensation that is harder to pin down: a feeling of internal shaking, vibrating, or buzzing that they experience throughout the body or in certain areas, but that is not visible from the outside. This is distinct from an actual tremor. If someone watched you, they would see nothing. The shaking is entirely internal, a sensation rather than a movement. Clinicians call this “internal tremor,” and it straddles the line between neurology and subjective experience in a way that has made it difficult to study.
Internal tremor has gained attention in the context of Long COVID, where it was reported by about 37 percent of participants in one cross-sectional study. Researchers found that Long COVID patients who experienced internal tremor had higher rates of several autonomic nervous system disorders compared to those who did not, including postural orthostatic tachycardia syndrome (POTS), small fiber neuropathy, and mast cell activation problems.4PubMed Central. Internal Tremor in Long COVID May Be a Symptom of Dysautonomia and Small Fiber Neuropathy The connection to POTS is particularly relevant to lying down. POTS involves abnormal heart rate changes with posture shifts, and the autonomic instability it causes can produce all sorts of odd sensations, including buzzing, trembling, and rushes of adrenaline, that become more noticeable when you are lying still and not distracted.
Internal tremor is not exclusive to Long COVID. It has been described in patients with other conditions involving a hyperadrenergic state, where the body produces excess adrenaline or the nervous system overreacts to normal stimuli. The key feature that distinguishes internal tremor from other types of shaking is that it is invisible to an observer. Because it is subjective and cannot be measured on standard neurological exams, patients sometimes feel dismissed when they bring it up.4PubMed Central. Internal Tremor in Long COVID May Be a Symptom of Dysautonomia and Small Fiber Neuropathy If you experience this kind of vibrating sensation, particularly if it is accompanied by a racing heart, lightheadedness when standing, or unusual fatigue, an evaluation focused on autonomic function is more productive than a standard neurological workup looking for visible tremors.
Anxiety and the Adrenaline Connection
Anxiety is probably the most underestimated cause of body shaking at bedtime. When your body is in a state of heightened stress, the sympathetic nervous system keeps your muscles primed with low-level tension. During the day, movement and distraction mask this. When you lie down in a quiet, dark room and stop moving, you suddenly become aware of the tension, and the fine trembling it produces, in a way you could not notice before.
The mechanism is straightforward. Stress hormones like adrenaline and cortisol increase muscle tone and neural excitability. Even after the stressful event is over, it takes time for these chemicals to clear. If you are lying down within a few hours of a stressful experience, or if you carry chronic stress, you may feel a general trembling, quivering, or internal vibration that has no visible cause. Your body is not malfunctioning. It is still in alert mode and has not fully shifted into the parasympathetic, rest-and-digest state that allows muscles to fully relax.
For some people, the act of lying down itself triggers anxiety, especially if they have had panic attacks at night. Nocturnal panic attacks are a well-recognized phenomenon where a person wakes from sleep with intense physical symptoms, including shaking, numbness, a pounding heart, and a sense of dread, without any obvious trigger. These can overlap clinically with other conditions that occur during sleep, making them tricky to diagnose without a careful history.5Brain Sciences. Awakening from Sleep with Numbness and Indescribable Odd Feeling: Nocturnal Panic Attack or Sleep-Related Epilepsy? If you find yourself dreading bedtime because of these episodes, that dread itself feeds the cycle by keeping your stress hormones elevated right when you need them to drop.
Caffeine, Medications, and Other Common Triggers
Before looking for a diagnosis, it is worth considering the chemical environment your body is operating in. Caffeine is the most obvious culprit. It blocks adenosine receptors, which are part of the system that promotes sleepiness and muscle relaxation. Consuming caffeine in the afternoon or evening can leave enough of it circulating to make the sleep-wake transition jumpier, increasing both hypnic jerks and the general feeling of trembling.
Certain medications can also cause shaking or trembling at rest. Stimulant medications for ADHD, some asthma inhalers containing beta-agonists, and certain antidepressants (particularly SSRIs and SNRIs in the early weeks of use) can increase muscle excitability. Withdrawal from sedatives, including alcohol, benzodiazepines, and even antihistamines used as sleep aids, can produce rebound excitability that shows up as trembling, particularly at night when you are trying to relax.
Dehydration and electrolyte imbalances are another practical cause. Magnesium, calcium, and potassium all play roles in muscle contraction and relaxation. When levels are low, muscles become twitchier. This does not usually manifest as dramatic full-body shaking, but rather as fasciculations (visible muscle twitches under the skin), a jittery feeling in the limbs, or cramping that you notice most when you are lying still. If you exercise heavily, sweat a lot, or eat a restricted diet, electrolyte imbalance is worth investigating before assuming something neurological is going on.
Telling the Difference Between Causes
Because “shaking when I lie down” can mean so many different things, the details of what you feel matter a lot for figuring out the cause. Here are the distinctions that tend to be most useful:
- Single jolt as you fall asleep: Almost certainly a hypnic jerk. Normal, harmless, and more common when you are tired, stressed, or caffeinated.
- Rhythmic leg jerking at rest: Likely periodic limb movements, often associated with restless legs syndrome. Check iron levels.
- Whole-body trembling with a racing heart: Anxiety, excess adrenaline, or caffeine. Consider whether stress or a stimulant is involved.
- Internal vibrating nobody else can see: Internal tremor. If it persists and is accompanied by fatigue, lightheadedness, or heat intolerance, autonomic dysfunction is worth exploring.
- Pounding or shaking in the chest: Likely awareness of your heartbeat after the blood volume shift of lying down. Persistent palpitations warrant cardiac evaluation.
- Waking from sleep with shaking, numbness, and panic: Could be a nocturnal panic attack or, less commonly, a sleep-related seizure. A sleep study and careful clinical history can help distinguish between them.
Timing matters too. Shaking that happens only during the transition from wakefulness to sleep points toward hypnic jerks or anxiety. Shaking that occurs during sleep and wakes you up points toward periodic limb movements, nocturnal panic, or a sleep-related neurological event. Shaking that persists while you are lying down but fully awake suggests either anxiety, an internal tremor related to autonomic issues, or a medication side effect.
When Shaking at Night Signals Something Serious
The vast majority of nighttime shaking falls into the benign category. Hypnic jerks, stress-related trembling, and caffeine effects are the explanation for most people. But there are scenarios where shaking at rest deserves medical attention sooner rather than later.
A new tremor that is visible to others and present when you are at rest, not just falling asleep, can be a sign of a neurological condition such as Parkinson’s disease or essential tremor. Parkinson’s tremor classically appears in one hand at rest and has a rhythmic, pill-rolling quality. Essential tremor tends to appear with action rather than at rest, but it can be felt when lying still if the affected limb is not fully supported. Neither of these conditions is likely in a young, otherwise healthy person, but if you notice a persistent visible tremor, a neurological evaluation is warranted.
Shaking accompanied by confusion, tongue biting, loss of bladder control, or a period of complete unresponsiveness raises the possibility of a seizure. Seizures during sleep are not always dramatic convulsions; they can present as subtle repetitive movements, brief stiffening, or odd sensations followed by confusion. The overlap between nocturnal panic attacks and sleep-related epilepsy is a recognized diagnostic challenge, and sometimes a sleep EEG is needed to tell them apart.5Brain Sciences. Awakening from Sleep with Numbness and Indescribable Odd Feeling: Nocturnal Panic Attack or Sleep-Related Epilepsy?
Thyroid disorders, particularly hyperthyroidism, can cause a fine tremor throughout the body that becomes more noticeable at rest. If shaking is accompanied by unexplained weight loss, heat intolerance, or a rapid resting heart rate, a simple blood test can check thyroid function and either rule it in or out quickly.
Practical Steps to Reduce Nighttime Shaking
If your doctor has ruled out anything concerning, or if the pattern clearly fits hypnic jerks or stress-related trembling, there are a few straightforward things that help. Cutting caffeine after midday is the single most effective change for most people, and it often produces noticeable improvement within a few days. Keeping a consistent sleep schedule reduces the instability of the sleep-wake transition that gives rise to hypnic jerks.
Progressive muscle relaxation, where you systematically tense and then release each muscle group starting from your feet, can be surprisingly effective at calming the trembling that comes from residual stress tension. The act of deliberately tensing a muscle and then letting go seems to signal the nervous system that it is safe to downshift. Deep, slow breathing that emphasizes a long exhale activates the parasympathetic nervous system and counters the adrenaline response more directly than trying to “think yourself calm.”
If you suspect electrolytes might be involved, a magnesium supplement taken in the evening is a low-risk intervention that many people find helpful for muscle twitching and general restlessness. Magnesium glycinate and magnesium citrate are the forms most commonly recommended for sleep-related use, as they tend to be better absorbed and less likely to cause digestive upset than magnesium oxide. This is not a substitute for checking with a doctor if symptoms are persistent or worsening, but for mild, intermittent shaking that lines up with dehydration or heavy exercise, it is a reasonable first step.