Are you tensing up, holding your breath etc? Sometimes you can do that without even realising and can be holding your tummy muscles tight to the point they can cramp.. Remember as well that at the point of orgasm, your muscles (tummy, legs, pelvic muscles, muscles in your bottom) go through a series of contractions that can ache a bit, moreso if you are already a bit tender (period pain if you're a girl, constipation, pulled muscle, needing the loo). Can also happen if you're masturbating a bit too much as you're effectively tiring the muscles out.
Maybe give it a few days off, try a bit of ibuprofen or a hot water bottle - and if it continues, have a word with the doc.