There are various causes, it can be an infection such as gastroenteritis, nerves such as butterflies in your stomach or food that irritates like caffeine or spices
A tummy ache is normally a short-term reaction to something unusual in the stomach, so food that is spicy, acidic. It might last longer if the food is off so the body then tries to get this out of the system as quick as possible (vomiting for example). Or you might have a virus or infection that lasts longer as your body tries to develop natural ways to beat the infection.
Comments