Those cramps in the stomach are actually cramps in the diaphragm- the biggest breathing muscle in the body. Since it is located in the abdomen, it feels like a stomach cramp. These are called side stitches. The reason behind these have not been clearly identified by research but there are a few factors that might be causing them.

1. Running too fast while breathing rapidly- when you run fast, this creates a pressure in the abdominal muscles which presses up against the diaphragm. At the same time rapid breathing expands your lungs which also puts pressure on the diaphragm. This dual pressure from above and below cause the diaphragm to cramp. 

Solution: Stop running, take long deep breaths, stretch your arms to the sky and repeat deep breaths till the stitch stops.

2. Eating too much or eating fatty foods can also cause a side stitch. This makes the stomach heavier and increases the pull on the diaphragm. 

Solution:Eat light and don’t eat something immediately before the run.

Side stitches are more common in beginners, so once you get your breathing and eating habits under control the side-stitches should gradually fade away.