A study has identified a link between a common condition and menstrual pain opening the door for help for women