Hello I have gone through your complaints.
As your doctor told, it can be a gestic pain.
If the abdominal pain is associated with vomitings or loose stools or passing worms in the stools or if it is continuous , then it requires a proper evaluation. As your child is having only episodic presentation and not having any danger signs, so you can just wait and see . If it is severe you can get evaluated after taking opinion of your with ultrasound
abdomen. If there is no abnormality then we will diagnose it as functional abdominal pain
Thank you. Good day.