After having a cesarean, you need to wait about six weeks.
A visit to your doctor is required to ensure that your incision is healing well and that your postpartum bleeding has stopped. This bleeding comes from inside the uterus
, at the site where the placenta was located.
When you are given the go ahead for sex, you need to consider some other factors. For example, if your incision is still tender, you may wish to use a position where you have the woman on top or a side or rear entry position to avoid direct contact with your incision. You should also use vaginal lubricants to assist you in intercourse.
As far as pain sex is concerned...
When you’re pregnant, your body prepares itself for a vaginal birth...not a C-section. Part of the way your body prepares itself is that your vaginal tissues become engorged in preparation for your baby’s exit. The swollen or engorged tissues don’t immediately go back to “normal” after birth. These engorged tissues may be what’s causing the pain you feel during sexual intercourse. This swelling goes down in due course of time of it's own.