Our Services
Medical Information
Helpful Resources
Published on: 9/15/2026
Twitching in the rib cage after coffee is most often a caffeine-driven muscle fasciculation, because caffeine excites nerve endings and can make the intercostal muscles, diaphragm, or chest wall muscles fire involuntarily. Common contributors include dehydration, low magnesium or potassium, anxiety, poor sleep, acid reflux, and heart palpitations that are felt along the ribs rather than in the chest. Timing, dose, and whether the twitch comes with pain, shortness of breath, or a racing heartbeat all change what it likely means, so there are several factors to consider before assuming it is harmless caffeine sensitivity. Details on the warning signs that deserve prompt medical attention, and the benign patterns that usually resolve on their own, are outlined below.
Because a twitch you can feel is hard to interpret alone, and the same sensation can trace back to muscle, nerve, digestion, or heart-related causes, it is worth taking a free, instant, online symptom check to see which explanations best match your specific pattern and to understand what step makes sense next.
Last reviewed for medical accuracy: 09/15/2025
Noticing a gentle twitch or flutter under your right rib cage after enjoying a cup of coffee can be unsettling, especially when there’s no pain. In most cases, this “twitching under right rib cage no pain” sensation is harmless and linked to how caffeine interacts with your body. Below, we explain the most common reasons, what to watch for, and simple steps to manage or prevent these harmless muscle spasms.
Caffeine is a central nervous system stimulant. Its effects on muscles and nerves explain why you might feel twitching after a cup or two:
When you experience twitching under your right rib cage with no pain, consider these typical triggers:
In most cases, twitching under right rib cage no pain is not a sign of anything serious. However, seek medical advice if you notice any of the following:
If you’re unsure where your symptoms fit, you might consider a free, online symptom check, using the doctor approved Ubie Symptom Checker to help guide the next steps.
If your rib cage twitching is linked to coffee or caffeine intake, here are practical steps you can take:
While benign twitches are common, always err on the side of caution if you experience worrying signs. Speak to a doctor if you notice:
Your healthcare provider can perform a focused exam, order blood tests (electrolytes, magnesium levels) or refer you to a neurologist if needed.
By understanding the link between caffeine and muscle excitability, you can enjoy your morning brew with less worry. If twitching continues or you have any concerns, don’t hesitate to consult your healthcare provider.
(References)
* Klingler W, Heffron JJ, Jurkat-Rott K, O'sullivan G, Alt A, Schlesinger F, Bufler J, Lehmann-Horn F. 3,4-Methylenedioxymethamphetamine (ecstasy) activates skeletal muscle nicotinic acetylcholine receptors. J Pharmacol Exp Ther. 2005 Sep;314(3):1267-73. doi: 10.1124/jpet.105.086629. Epub 2005 Jun 9. PMID: 15947037.
* Fermont J, Arts IM, Overeem S, Kleine BU, Schelhaas HJ, Zwarts MJ. Prevalence and distribution of fasciculations in healthy adults: Effect of age, caffeine consumption and exercise. Amyotroph Lateral Scler. 2010;11(1-2):181-6. doi: 10.3109/17482960903062137. PMID: 19533451.
* Simon NG, Kiernan MC. Fasciculation anxiety syndrome in clinicians. J Neurol. 2013 Jul;260(7):1743-7. doi: 10.1007/s00415-013-6856-8. Epub 2013 Feb 12. PMID: 23400500.
* Rodriguez RS, Haugen R, Rueber A, Huang CC. Reversible neuronal and muscular toxicity of caffeine in developing vertebrates. Comp Biochem Physiol C Toxicol Pharmacol. 2014 Jun;163:47-54. doi: 10.1016/j.cbpc.2014.03.004. Epub 2014 Mar 22. PMID: 24667760.
* Khalkhali M. Topiramate-Induced Persistent Eyelid Myokymia. Case Rep Psychiatry. 2016;2016:7901085. doi: 10.1155/2016/7901085. Epub 2016 May 17. PMID: 27293943; PMCID: PMC4886081.
* Bordoni B, Goldin J, Sugumar K. Muscle Cramps. 2026 Jan. PMID: 29763070.
* Nelke C. Right Brain: The Strangeness of a Good Diagnosis. Neurology. 2024 Feb 13;102(3):e208103. doi: 10.1212/WNL.0000000000208103. Epub 2023 Dec 28. PMID: 38165299.
* Salai G, Ljubičić Đ, Novak R, Grgurević L. Benign fasciculation syndrome and migraine aura without headache as possible adverse events after BNT162b2 mRNA vaccination: a web-based survey. Croat Med J. 2023 Dec 31;64(6):430-435. doi: 10.3325/cmj.2023.64.430. PMID: 38168524; PMCID: PMC10797237.
* Gunes IB. Association Between Eyelid Twitching and Digital Screen Time, Uncorrected Refractive Error, Intraocular Pressure, and Blood Electrolyte Imbalances. Cureus. 2024 Sep;16(9):e69249. doi: 10.7759/cureus.69249. Epub 2024 Sep 12. PMID: 39282492; PMCID: PMC11398718.
* Ahsan M, Nizami DJ. Metformin-induced eyelid myokymia. Indian J Pharmacol. 2024 Sep 1;56(5):358-360. doi: 10.4103/ijp.ijp_284_24. Epub 2024 Dec 16. PMID: 39687960; PMCID: PMC11698286.
We would love to help them too.
For First Time Users
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.