Why does the stomach ache if you take a brisk walk after lunch or dinner
The reasons for Exercise-related Transient Abdominal Pain are unknown. The current theories are:


Irritation of the parietal peritoneum, a structure lining the abdominal wall as it rubs against the visceral peritoneum, which lies against it and over the top of the abdominal organs
Strain on the ligaments that suspend the abdominal organs (however somewhat unlikely as it occurs during swimming




It used to be thought that blood was diverted away from the diaphragm during exercise causing pain however that has been found to be incorrect.

See this link: http://www.ausport.gov.au/ais/nutrition/factsheets/hydration/cramps_and_stitch