H.W.
I'd talk to the teacher and ask if they notice anything is going on between your daughter and her friends. At this age, sometimes those 'tummy aches' are a nervous response to dealing with social issues at school, including peer social aggression. Our school nurse cites nerves and emotional upset as one of the common reasons children wind up in her office complaining of 'tummy aches'. I also volunteer a lot of time at my son's school and see the first and second grade classes... there are a lot of social dynamics at play with the girls; this includes little cliques of three girls where one is usually the 'follower' of the other two and gets left out of certain things, depending on the temperaments of the more dominant girls. It's pretty icky to watch, but confusing for these young kids, who can feel that the kids treating them poorly are still their 'friends'. They aren't at an age to be more objective and see the reality of the dynamic.
That's where I would start first, if it were my child. It may be that your daughter is processing your mother's death. It's sometimes hard to know.
Have you modified her diet to help with the constipation? That might help. That said, since this is only happening on school days (by your account) the school is where I would look first. Good luck!