system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5: what causes a side stitchs or a sharp pain in your side, when you walk or run?
gpt
There are two theories why you can get sidestitches, and both involve the diaphragm.

a. Your diaphragm is just not used to breathing that hard, so it starts to cramp.

b. When you're running and breathing hard the lining that separates the abdomen (where all your guts are) rubs against the diaphragm and causes nerve irritation.

Either of these reasons irritate a nerve that's attached to the diaphragm (phrenic nerve. We have two, one is attached on each side of the diaphragm) which we interprete as pain in the side.

How to not get a stitch. Warm up more, breathe deeper, strengthen your core muscles.