Hi thanks for your question
your getting painful intercourse for last one month and you want to know,what is the cause ?
Most probably your having
cervicitis that is inflammation of cervix(lower part of
uterus) which is giving you
pain during intercourse.
As for as your post intrcourse legs cramps is concerned , it could be related to position during intercourse but it could have other causes also,which needs to be worked up.
For both conditions you need a physician consultation.
Hope I answered your question