Pain when on bottom

Recently when me and my boyfriend have been having sex it's been really painful if he gets on top, it never use to what's wrong with me?? I had a miscarriage a couple months ago but I don't think that would be the reason because we had sex after once the doctor said I could