There can be many reasons of this pain because the pain is not a disease. It is symptom of some other diseases. The pain at the mid of cycle or at the time of ovulation is called mittelschmerz syndrome. There is no treatment of this pain. Only you can manage by taking pain killers. I advise you to visit a doctor for differential diagnosis and treatment.
There can be many reasons for pain.
It may be regular cycles discomfort. That is that you are having trouble passing some of the material. You may be surprised to know you may be having the start of menopause. If this troubles you, don't hesitate to call your doctor. Wishing you well