Tummyache is a status ailment, similar to "poison" in most games, which slowly seeps away the player's hp for as long as it is in effect. Ingesting almost anything while having a tummyache only makes it worse; the exception is ginger ale and the Mama Mia Pasta Sauce (which removes all status ailments).
The severity (that is, how many hit points are taken each turn) and duration (how many turns the effect lasts) varies depending on its cause. Dangerous comestibles do several points of damage for a longer period of time, while stale or rotten comestibles do less of both. Eating too much will only take away a few hit points but might last a good while.