That would be your diaphragm and it is spasming/cramping just like any other muscle.
“. . . sharp, intense pain under the lower edge of the ribcage caused by a muscle spasm of the diaphragm. Such pain can occur during vigorous exercise, such as running, and seems to occur more commonly in novice exercisers who have not yet established proper pacing and who tend to breathe more quickly and shallow. However, about 30% of all runners will experience stitches at some point. What exactly causes them? On inhalation, we take air into the lungs, pressing the diaphragm downward. When we exhale, the diaphragm moves up. If the body has some trapped air/gas below the diaphragm, if we’ve eaten too close to exercise, or if we start exercising too vigorously, the diaphragm may cramp, causing pain under the rib cage on the right side.”