DD2 says she gets a lot of tummy pains and like you've described mostly they are at bed time, or else off to kindy or something she doesn't want to do. She is medicated for severe anxiety and her paed is sure that the two are related. I'm a migraine sufferer too and abdominal migraines were my initial worry but we've ruled that out. She asks for medicine and says she needs cuddles. If its bed time she tells me she won't be able to sleep because her tummy hurts so much and needs me to stay with her or she gets very upset. Most of the time I just deal with it by saying well, the best thing for a tummy ache is sleep so how about we lie down together and go to sleep. Sometimes it works, sometimes it doesn't. I also do what Maruschke suggests and offer DD2 something special to do the next day, after kindy or whatever works in the situation.