Doctors Note Logo

Published on: 9/13/2026

Does the flutter under my ribs get worse after coffee or a hard workout?

Yes, fluttering sensations under the ribs often become more noticeable after caffeine or intense exercise, because both raise adrenaline levels and heart rate, which can trigger benign palpitations, premature heartbeats, or muscle twitching in the diaphragm. Dehydration, low electrolytes such as potassium and magnesium, stress, poor sleep, acid reflux, and anxiety can amplify the same flutter, and timing matters since palpitations that appear during peak exertion are treated differently than those that show up during recovery. Most cases are harmless, but flutter paired with chest pain, fainting, severe shortness of breath, or a racing pulse that will not settle needs urgent evaluation. There are several important factors and warning signs to consider, so see below to understand more before deciding whether to adjust your coffee intake or your training.

Because caffeine, exertion, reflux, and rhythm changes can all produce nearly identical flutters, guessing wastes time and often adds worry, so it helps to sort your specific pattern quickly: take a free, instant, online symptom check to see which causes best match what you feel and what your sensible next step should be.

Last reviewed for medical accuracy: 09/12/2026

answer background

Explanation

Understanding the Flutter Under Your Ribs: Coffee, Workouts, Fasciculations & Magnesium Deficiency

Feeling a fluttering or “tickle” just under your ribs can be unsettling. Many people describe it as a twitch, flutter or light vibration. Before jumping to worst-case scenarios, it’s useful to know that in most cases this sensation is harmless and related to muscle activity—what doctors call fasciculations—or to shifts in electrolyte balance, particularly magnesium deficiency. Here’s what you need to know.

What You Might Be Feeling

  1. Diaphragm or Intercostal Muscle Fasciculations

    • Small, involuntary muscle twitches.
    • Occur in the thin muscles between your ribs (intercostals) or in the diaphragm itself.
    • Often feel like a light flutter or tremor under the ribcage.
  2. Palpitations vs. Muscle Twitch

    • A true heartbeat flutter (palpitation) usually comes with pounding, racing or skipping sensations in the chest.
    • Fasciculations are more localized, quiet, and often reproducible by gently pressing on the area.
  3. Gastrointestinal Movements

    • Rarely, moving gas or intestinal contractions can be felt near the lower ribs.
    • These are more like gurgles or “rumbling” than a steady flutter.

Why Coffee Might Make It Worse

  • Caffeine as a Stimulant

    • Caffeine increases nerve and muscle excitability.
    • This heightened excitability can trigger or exaggerate fasciculations in sensitive muscles, including those under your ribs.
  • Dehydration Factor

    • Coffee is mildly diuretic and can promote fluid loss.
    • Dehydration can worsen muscle twitching by altering normal electrolyte levels.
  • Sleep Disruption

    • Consuming coffee late in the day can affect sleep quality.
    • Fatigued muscles and nerves are more prone to twitching.

Why Hard Workouts Might Make It Worse

  • Muscle Fatigue

    • Intense exercise leads to micro-tears and fatigue in muscle fibers.
    • Fatigued muscles can develop spontaneous twitches as they recover.
  • Electrolyte Loss

    • Heavy sweating depletes sodium, potassium and magnesium.
    • Loss of these minerals can trigger or amplify fasciculations.
  • Increased Nerve Activity

    • Exercise speeds up nerve signals to and from muscles.
    • This can temporarily increase the chance of unwanted muscle contractions.

The Role of Magnesium Deficiency

  • Magnesium’s Job

    • Helps muscles relax after contracting.
    • Regulates nerve function and muscle excitability.
  • Signs You Might Be Low

    • Frequent muscle cramps or spasms
    • Persistent twitching or fasciculations
    • Fatigue, irritability or trouble sleeping
    • In severe cases, tingling or numbness
  • Risk Factors for Low Magnesium

    • High-intensity workouts without proper replenishment
    • Diets low in leafy greens, nuts, seeds and whole grains
    • Excessive alcohol or caffeine intake
    • Certain medications (diuretics, proton-pump inhibitors)

Practical Steps to Ease the Flutter

  1. Moderate Your Caffeine

    • Limit coffee to 1–2 cups daily.
    • Avoid coffee or other high-caffeine drinks in the late afternoon and evening.
  2. Hydrate Smartly

    • Drink water before, during and after workouts.
    • Consider an electrolyte beverage if you sweat heavily.
  3. Boost Your Magnesium

    • Foods rich in magnesium:
      • Dark leafy greens (spinach, kale)
      • Nuts and seeds (almonds, pumpkin seeds)
      • Whole grains (brown rice, oats)
      • Legumes (black beans, lentils)
    • If diet alone isn’t enough, a low-dose supplement (200–400 mg daily) can help. Always check with your doctor first.
  4. Gentle Stretching and Massage

    • Lightly massage the area under your ribs.
    • Gentle stretching of your chest, upper back and intercostal muscles can ease tension.
  5. Adjust Workout Intensity

    • Scale back on extremely intense sessions until the twitching subsides.
    • Incorporate rest days and active recovery (light yoga, walking).

When to Worry

Most fasciculations and minor muscle twitches are benign. However, you should speak to a doctor right away if you experience any of the following:

  • Severe, crushing chest pain or pressure
  • Shortness of breath, dizziness or fainting
  • Twitching accompanied by muscle weakness
  • Symptoms that persist or worsen despite lifestyle changes
  • Any sign of a serious condition you can’t explain

If you’re uncertain about the cause or severity of your symptoms, consider a free, online symptom check, using the doctor approved Ubie Symptom Checker (https://ubiehealth.com/). It’s a quick way to get guidance on whether you need to pursue urgent care.

Key Takeaways

  • A flutter under your ribs is often fasciculations—benign muscle twitches.
  • Caffeine and hard workouts can both increase muscle excitability and worsen twitching.
  • Magnesium deficiency is a common and treatable contributor to muscle fasciculations.
  • Simple fixes include moderating coffee, staying hydrated, and boosting magnesium through diet or supplements.
  • Always monitor for alarming symptoms (chest pain, breathlessness, weakness) and speak to a doctor if you suspect anything serious or life-threatening.

By understanding the interplay between caffeine, exercise, electrolyte balance and muscle health, you can take control of benign twitches and reduce discomfort under your ribs. If in doubt, don’t hesitate to seek professional advice—your health is worth it.

(References)

  • * Woods DR, Allen S, Betts TR, Gardiner D, Montgomery H, Morgan JM, Roberts PR. High altitude arrhythmias. Cardiology. 2008;111(4):239-46. doi: 10.1159/000127445. Epub 2008 Apr 23. PMID: 18434732.

  • * O'Keefe JH, Bhatti SK, Patil HR, DiNicolantonio JJ, Lucan SC, Lavie CJ. Effects of habitual coffee consumption on cardiometabolic disease, cardiovascular health, and all-cause mortality. J Am Coll Cardiol. 2013 Sep 17;62(12):1043-1051. doi: 10.1016/j.jacc.2013.06.035. Epub 2013 Jul 17. PMID: 23871889.

  • * Probst MA, Kanzaria HK, Hoffman JR, Mower WR, Moheimani RS, Sun BC, Quigley DD. Emergency Physicians' Perceptions and Decision-making Processes Regarding Patients Presenting with Palpitations. J Emerg Med. 2015 Aug;49(2):236-43.e2. doi: 10.1016/j.jemermed.2015.02.013. Epub 2015 May 2. PMID: 25943288; PMCID: PMC4522216.

  • * Castro D, Sharma S. Hypokalemia. 2026 Jan. PMID: 29494072.

  • * Åberg I, Mattsson G, Magnusson P. [Postural orthostatic tachycardia syndrome]. Lakartidningen. 2018 Oct 9;115. Epub 2018 Oct 9. PMID: 30299528.

  • * Fedorowski A. Postural orthostatic tachycardia syndrome: clinical presentation, aetiology and management. J Intern Med. 2019 Apr;285(4):352-366. doi: 10.1111/joim.12852. Epub 2018 Nov 23. PMID: 30372565.

  • * Bosco J, Titano R. Severe Post-COVID-19 dysautonomia: a case report. BMC Infect Dis. 2022 Mar 3;22(1):214. doi: 10.1186/s12879-022-07181-0. Epub 2022 Mar 3. PMID: 35241011; PMCID: PMC8892817.

  • * de Souza JG, Del Coso J, Fonseca FS, Silva BVC, de Souza DB, da Silva Gianoni RL, Filip-Stachnik A, Serrão JC, Claudino JG. Risk or benefit? Side effects of caffeine supplementation in sport: a systematic review. Eur J Nutr. 2022 Dec;61(8):3823-3834. doi: 10.1007/s00394-022-02874-3. Epub 2022 Apr 5. PMID: 35380245.

  • * Hao S, Tan S, Li J, Li W, Li J, Liu Y, Hong Z. The effect of diet and exercise on climacteric symptomatology. Asia Pac J Clin Nutr. 2022;31(3):362-370. doi: 10.6133/apjcn.202209_31(3).0004. PMID: 36173208.

  • * Ufuk F, Kilic ID. Case 315: Cardiac Calcified Amorphous Tumor. Radiology. 2023 Jul;308(1):e220881. doi: 10.1148/radiol.220881. PMID: 37489990.

Thinking about asking ChatGPT?Ask me instead

Tell your friends about us.

We would love to help them too.

smily Shiba-inu looking

For First Time Users

What is Ubie’s Doctor’s Note?

We provide a database of explanations from real doctors on a range of medical topics. Get started by exploring our library of questions and topics you want to learn more about.

Was this page helpful?

Purpose and positioning of servicesUbie Doctor's Note is a service for informational purposes. The provision of information by physicians, medical professionals, etc. is not a medical treatment. If medical treatment is required, please consult your doctor or medical institution. We strive to provide reliable and accurate information, but we do not guarantee the completeness of the content. If you find any errors in the information, please contact us.