Painful periods and children

You ladies with smaller children (6 and under) that have painful periods. How do you deal with that? I have a 2 and 4 year old and when I'm in pain I get irratted plus my period makes me even more irratated and I get frustrated with them so easily the first 2 days of my period😔 I always apologize. It makes me upset that I do that and I feel so bad...

I do take medication for the pain it just doesn't help.