Repeated menstrual cycles may do more than trigger endometriosis. They may rewire the brain.