Doctors Note Logo

Published on: 9/16/2026

Why does my diaphragm hurt when I take a deep breath or twist?

Diaphragm pain that flares when you breathe deeply or twist your torso often comes from strained muscles, an irritated intercostal or phrenic nerve, or inflammation of the lining around the lungs (pleurisy), and it can also stem from a hiatal hernia, gallbladder trouble, acid reflux, rib injury, or recent intense exercise. The pattern of your pain matters: sharp, catching pain with movement usually points to musculoskeletal or nerve causes, while burning pain with meals suggests digestive origins, and pain with fever, cough, or shortness of breath may signal infection or a lung problem. Certain warning signs, including chest pressure, difficulty breathing, blue lips, coughing up blood, or pain spreading to the shoulder or jaw, need emergency care right away. There are several important distinctions and treatment options to weigh, so see below to understand more about likely causes, self-care steps, and when to see a doctor.

Because so many different conditions share this one symptom, guessing can lead to weeks of unnecessary discomfort or a missed diagnosis, and a free, instant, online symptom check can help you sort your specific pattern of pain into likely explanations and clarify whether to monitor at home, book an appointment, or seek urgent care today.

Last reviewed for medical accuracy: 09/15/2026

answer background

Explanation

Why Does My Diaphragm Hurt When I Take a Deep Breath or Twist?

Experiencing a sharp or dull ache under your ribs—especially when you take a deep breath or twist—can be unsettling. The diaphragm is a dome-shaped muscle that separates the chest cavity from the abdominal cavity and plays a crucial role in breathing. When it or the surrounding structures become irritated, strained or inflamed, you’ll notice pain whenever you expand your lungs or move your torso.

Below, we explore common and less-common reasons for diaphragm pain, simple self-care steps, and when to seek professional help. If you’re ever unsure about your symptoms, you can always try a free, online symptom check, using the doctor approved Ubie Symptom Checker.


1. Common Causes of Diaphragm Pain

1.1 Muscle Strain or Overuse

  • What it is: Like any muscle, your diaphragm can be strained by heavy lifting, intense coughing, or forceful sneezing.
  • Symptoms: Aching or sharp pain with deep breaths, twisting, or when coughing again.
  • Management:
    • Rest the area and avoid strenuous activity for a few days.
    • Apply a warm compress to relax the muscle.
    • Take over-the-counter pain relief (e.g., ibuprofen) as directed.

1.2 Diaphragmatic Spasm or Cramp

  • What it is: Sudden involuntary contraction of the diaphragm, often called a “charley horse” in the chest.
  • Symptoms: Quick, stabbing pain that may last seconds to minutes; sometimes triggers hiccups.
  • Management:
    • Practice slow, controlled breathing.
    • Gently stretch your torso by raising arms overhead and leaning to the opposite side of the spasm.
    • Stay hydrated and maintain balanced electrolytes (potassium, magnesium).

1.3 Intercostal Muscle Strain

  • What it is: The intercostals are muscles between your ribs that assist your diaphragm. They can be injured by twisting injuries or sudden movements.
  • Symptoms: Sharp pain between ribs, worse with deep breaths or twisting your torso.
  • Management:
    • Limit twisting motions and heavy lifting.
    • Use ice (first 48 hours) then heat packs.
    • Support your chest with a pillow when coughing or sneezing.

2. Inflammatory and Structural Causes

2.1 Costochondritis

  • What it is: Inflammation of the cartilage attaching your ribs to the breastbone.
  • Symptoms: Tenderness along the front of the chest, easily reproduced by pressing on the ribs.
  • Management:
    • NSAIDs (e.g., naproxen) for inflammation.
    • Gentle stretching and avoiding activities that aggravate the area.

2.2 Hiatal Hernia

  • What it is: Part of the stomach pushes through the diaphragm into the chest cavity.
  • Symptoms: Heartburn, regurgitation, chest pain worse when lying down or bending over.
  • Management:
    • Eat smaller, more frequent meals.
    • Avoid spicy or fatty foods, caffeine, and alcohol.
    • Elevate your head in bed.
    • If symptoms persist, seek medical evaluation.

2.3 Pleurisy

  • What it is: Inflammation of the lining around the lungs (pleura), often due to infection or autoimmune conditions.
  • Symptoms: Sharp, stabbing pain that worsens with deep breaths, coughing, or sneezing.
  • Management:
    • Treat underlying infection (antibiotics if bacterial).
    • Pain control with NSAIDs or prescription pain relievers.
    • Rest and shallow breathing until inflammation subsides.

3. Digestive and Abdominal Contributors

3.1 Acid Reflux / GERD

  • What it is: Stomach acid backflows into the esophagus, irritating surrounding tissues.
  • Symptoms: Burning chest pain, especially after meals or when bending over.
  • Management:
    • Antacids or acid-blocking medication (H2 blockers, proton-pump inhibitors).
    • Avoid trigger foods: citrus, chocolate, tomatoes, mint.
    • Eat at least 2–3 hours before lying down.

3.2 Gallbladder or Pancreas Issues

  • What it is: Gallstones or pancreatitis can cause referred pain to the upper abdomen and diaphragm region.
  • Symptoms: Steady, severe pain under the right ribs (gallbladder) or upper middle abdomen (pancreas), nausea, vomiting.
  • Management:
    • Seek prompt medical attention for evaluation (ultrasound, blood tests).
    • Avoid fatty meals until cleared by a doctor.
    • Follow prescribed treatment plans.

4. Less Common but Serious Conditions

4.1 Pneumonia

  • What it is: Infection of the lungs leading to inflammation and fluid build-up.
  • Symptoms: Fever, productive cough, difficulty breathing, chest pain intensifying on deep breaths.
  • Management:
    • Seek medical care for antibiotics and supportive therapy.
    • Rest, fluids, and follow-up chest X-ray if recommended.

4.2 Pericarditis

  • What it is: Inflammation of the lining around the heart (pericardium).
  • Symptoms: Sharp, central chest pain that may improve when leaning forward; sometimes radiates to shoulder or back.
  • Management:
    • Immediate medical evaluation is essential.
    • Treatment may include anti-inflammatory drugs or, in rare cases, drainage.

4.3 Rib Fracture or Trauma

  • What it is: Direct injury to ribs or cartilage can irritate the diaphragm due to its attachment to the rib cage.
  • Symptoms: Localized pain, bruising, tenderness, difficulty taking deep breaths.
  • Management:
    • Seek X-ray confirmation.
    • Pain control, breathing exercises to prevent lung complications.
    • Avoid casting—use a rib belt or just pain-guided breathing.

5. When to Seek Help

Pain under the ribs or in the diaphragm area can range from mild and self-limiting to signs of serious conditions. Seek immediate medical attention if you experience any of the following:

  • Sudden, severe chest pain lasting more than a few minutes
  • Difficulty breathing or shortness of breath at rest
  • High fever with chills and productive cough
  • Unexplained weight loss, persistent vomiting, or blood in vomit/stool
  • Pain radiating to the jaw, arm or back suggesting cardiac causes

Otherwise, if your pain is mild to moderate, you can begin self-care as described above. For extra reassurance, consider a free, online symptom check, using the doctor approved Ubie Symptom Checker.


6. Self-Care Tips for Diaphragm Comfort

  • Breathe slowly and deeply, holding each breath briefly before exhaling.
  • Apply gentle heat or ice to the sore area (20 minutes at a time).
  • Maintain good posture: sit up straight and avoid slouching.
  • Stay hydrated and eat balanced meals.
  • Gradually return to normal activities; don’t push through sharp pain.

7. Final Thoughts

Diaphragm pain with deep breathing or twisting can stem from simple muscle strain to more serious medical issues. Most causes improve with rest, anti-inflammatories, and gentle stretching. However, you should never hesitate to speak to a doctor if:

  • Your pain is severe or worsening
  • You have any life-threatening symptoms listed above
  • You’re uncertain about what’s causing your discomfort

Your health is too important to ignore. If you’re not sure what’s going on, start with a free, online symptom check, using the doctor approved Ubie Symptom Checker—and then speak to a healthcare professional for personalized advice.

(References)

  • * Cooper MJ, Russell P, Gallagher PJ. Diaphragmatic endometriosis. Med J Aust. 1999 Aug 2;171(3):142-3. doi: 10.5694/j.1326-5377.1999.tb123567.x. PMID: 10474606.

  • * Sorrentino D, Bazzocchi M, Badano L, Toso F, Giagu P. Heart-touching Chilaiditi's syndrome. World J Gastroenterol. 2005 Aug 7;11(29):4607-9. doi: 10.3748/wjg.v11.i29.4607. PMID: 16052699; PMCID: PMC4398719.

  • * Wang Z, Ye Q, Chen Y, Zhu J. Laparoscopic Repair of Diaphragmatic Eventeration in Adults: Plication With Mesh Repair. Surg Laparosc Endosc Percutan Tech. 2018 Oct;28(5):e91-e93. doi: 10.1097/SLE.0000000000000550. PMID: 29889109.

  • * Seidler S, Shabanov S, Andres A, Karenovics W, Wenger JM, Pluchino N. Diaphragmatic Endometriosis: Multidisciplinary Treatment. J Minim Invasive Gynecol. 2019 Mar-Apr;26(3):404. doi: 10.1016/j.jmig.2018.07.003. Epub 2018 Jul 19. PMID: 30031207.

  • * Samy A, Abbas AM, Mahmoud M, Taher A, Awad MH, El Husseiny T, Hussein M, Ramadan M, Shalaby MA, El Sharkawy M, Hatem D, Alaa-El-Din Wali A, Abd-El-Fatah SM, Hussein AH, Haggag H. Evaluating different pain lowering medications during intrauterine device insertion: a systematic review and network meta-analysis. Fertil Steril. 2019 Mar;111(3):553-561.e4. doi: 10.1016/j.fertnstert.2018.11.012. Epub 2019 Jan 2. PMID: 30611553.

  • * Torres Jimenez AR, Ruiz Vela N, Cespedes Cruz AI, Velazquez Cruz A, Bernardino Gonzalez AK. Shrinking lung syndrome in pediatric systemic lupus erythematosus. Lupus. 2021 Jun;30(7):1175-1179. doi: 10.1177/09612033211010331. Epub 2021 Apr 22. PMID: 33888011.

  • * Sığlan Ü, Çolak S. Effects of diaphragmatic and iliopsoas myofascial release in patients with chronic low back pain: A randomized controlled study. J Bodyw Mov Ther. 2023 Jan;33:120-127. doi: 10.1016/j.jbmt.2022.09.029. Epub 2022 Sep 29. PMID: 36775506.

  • * Sannasi R, Dakshinamurthy A, Dommerholt J, Desai V, Kumar A, Sugavanam T. Diaphragm and core stabilization exercises in low back pain: A narrative review. J Bodyw Mov Ther. 2023 Oct;36:221-227. doi: 10.1016/j.jbmt.2023.07.008. Epub 2023 Jul 13. PMID: 37949564.

  • * Zhu X, Hu C, Gong W. Upside-down stomach in paraesophageal hernia: A case report. Medicine (Baltimore). 2023 Dec 22;102(51):e36734. doi: 10.1097/MD.0000000000036734. PMID: 38134072; PMCID: PMC10735125.

  • * Bayer LL, Ahuja S, Allen RH, Gold MA, Levine JP, Ngo LL, Mody S. Best practices for reducing pain associated with intrauterine device placement. Am J Obstet Gynecol. 2025 May;232(5):409-421. doi: 10.1016/j.ajog.2025.01.039. Epub 2025 Feb 3. PMID: 39909325.

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.