P.W.
Of course you have to contact the doctor and rule out a medical issue, but does sound like could be anxiety. Sometimes anxiety from something that happened the day before can present itself later.........after you have calmed down. If you think that is the case you can consult a child therapist.
The other thought is reflux. Good pre and probiotics could help the situation.
Another thought. does this happen the day after a housekeeper comes or you do heavy cleaning. Cleaning material can be very toxic, especially for children. I'm no doctor, but I do sell non-toxic cleaners and health products. For example, one of my close friends had terrible headaches every time her housekeeper came, but after she switched to my products that never happened again.
Start keeping a diary of what your child eats, whether the day was stressful, cleaners, etc... maybe you can pinpoint something.