Muscle spasms in pelvic floor

Ce

My doctor told me yesterday that it appears I have muscle spasms in my pelvic floor. Makes sex painful for me, and I have what feels like cramps or sharp pains all throughout the month, but worse on my cycle. Anyone ever experienced this and what did you do to help the pain?