Hello Lysa,
it's definitely time to take him to the doctor. start keeping a log of everything he eats and when he eats, sleeping habits, date/time when the accident's happen and if you remember any specific food he had the day before. (sometimes it could be a few days between the food and the accident). Also, have you considered taking him to a chiropractor? (along w/ any other allergy, GI testing the Ped may want to do) (things to consider: milk, soy, gluten, nuts intolerances/allergy)
I also wanted to mention, I don't think he should be punished for that. and also, about knowing his body, if he has IBS or IBD....sometimes the only warning your body gives you is when it's out... =) You're a good stepmom.
good luck! ~C.~