Thank you for writing.
We can't say exactly what's going on but you may have an issue with your digestive system like IBS - irritable bowel syndrome or some other form of digestive condition. It could also be due to food allergies or sensitivities. If it happens again, take note of what you have eaten in the past 24 hours. Then call your doctor for advice.