How soon will pain disappear after anal sex?

Can take a few days. Anal intercourse can be uncomfortable because the rectal mucosa is sensitive and the anal sphincter can go into spasm. If you are not using condoms, then you may need to be checked for gonorrhea or chlamydia. Sexually transmitted infections can cause persistent pain or proctitis.
Soon unless torn. Will benefit from sitting in a warm bath. Send him out to get some preparation h if doesn't clear up during or after the sitzbath. See your dr. If pain persists >24 hours.