You could have IBS, stop doing whatever you think cause the problem. If it helps then you know what to do when you’re going to have your period. I also have a lot of stomach issues. It’s uncomfortable and it sucks and I hate it. So I get you, I’ve seen many doctors and honestly they haven’t found answers. All I can do for now is avoid whatever I know causes me problems until I figure out what’s wrong sadly, I would suggest seeing a doctor or a nurse if your still in school one day when it starts up again