Hello,
Some of the common causes for such pain are Infection or inflammation of the organs present in the pelvis, pelvic adhesions,
ovarian cysts, vaginal infections, bladder problems, irritable bowel syndrome, kidney causes, uterine fibroids and pelvic inflammatory diseases (PID) .Endometriosis can cause pelvic pain.
I suggest you to get it evaluated from a gynecologist and get an ultrasound done if the repeat happens.