People with depression may be more prone to experiencing period pain, potentially due to genetic factors in part, a new study has found.