Stomach cramps are caused by contractions of the stomach smooth muscle layers, and it can happen independently of exercise. The stomach muscles contract and relax throughout the day to help aid in digestion but it usually the most active during the parasympathetic nervous system's activation. This is one of the two main modes that we are normally in throughout the day and is chiefly responsible for "resting and digesting." This is the sensation that we typically feel after eating a big meal because our bodies would prefer to be as lazy as possible so we can use all our blood supply and energy to digest food particles. It is also the system responsible for us being tired at night and getting us to fall asleep. The muscles that are activated would be smooth muscles that line the glands and organs in our body.
When we are exercising, however, resting and digesting are the two things that we would rather not be doing. We need high amounts of energy, oxygen, and heart rates in order to make sure that our muscles are able to function during exercise. The system responds to make sure that we are performing at our peak potential is called the sympathetic nervous system. This is a system responsible for "fighting or flighting." Although we no longer have to sprint away from large predator animals anymore on our daily commutes to work, this physiological adaption was responsible for saving the human species during our early days and is still activated multiple times throughout the day. The muscles that are activated by this system would be the large fiber red and white muscles that we use during exercise.
This large tangent was designed to get me to my main point here of pointing out that it is not typical for patients to notice stomach pain during exercising. You may have noticed yourself that when you exercise, a stomach ache or potential diarrhea that you may have been having suddenly disappeared as our parasympathetic system switches to a sympathetic pathway. If you do notice stomach cramps during exercise, something could be wrong.
One of the most common causes of stomach cramps during exercise would be due to a lack of oxygen to the tissue. If you are not typically exercising, sudden bursts of activity could leave your muscles gasping for much-needed oxygen and that could manifest as muscle cramps and pain.
Another potential cause to watch out for would be potential GI distress too significant to be suppressed by only activating your sympathetic nervous system. The stomach flu is a very probable infection that could lead to severe stomach cramping during exercise so it is important to avoid any unnecessary movements as your body tries to fight the infection.
Sports hernias may also be a cause of your stomach "cramps." Patients with hernias will feel the pulsating pain that could mimic pain that you would see with cramps. This could be due to having a distended belly and will probably need surgical repair to relieve the pain.
Another condition that would also lead to stomach cramping would be GERD or reflux disease. When patients have overeaten before exercising, it is possible to have some of the food return to the esophagus and lead to a burning sensation in their stomach and throat. This could also feel like stomach cramping. Patients who have a history of reflux disease should try to limit their food intake before exercising in order to avoid this potentially unpleasant sensation.
On the other hand, having too little prior to eating could lead to muscle cramping due to an insufficiency of electrolytes. Foods rich in potassium and sodium can help alleviate the risk for stomach cramping and many sports drinks on the market are designed to give yourself this boost of electrolytes. 
Still have something to ask?
Get help from other members!