The gastrointestinal tract is a complicated system of nerves and muscles that pushes food through the digestive process. Some children's nerves are very sensitive and feel pain in response to even normal intestinal activities.
The most likely cause of stomach pain is not eating enough, not going to the bathroom, or a combination of the two. In some cases, a specific problem such as constipation, heartburn, or a food allergy causes abdominal pain. In other cases, the cause may not be so clear.
An infection, stress, or lack of sleep may make the intestinal nerves more sensitive to pain. In some cases, the problem may be genetic, which means it "runs in the family" and other family members have a similar history of the problem.