Problems during sex may also cause infertility. These can include:  Erectile dysfunction. Erectile dysfunction is also known as ED. ED means problems keeping or maintaining an erection. It can cause problems with sex.Pain during sex. Premature ejaculation. Premature ejaculation means releasing semen before the penis enters the vagina.Mental or emotional problems that interfere with sex.