The contraceptive sponge needs to be left in place for at least 6 hours after you have sex to prevent pregnancy. It must then be taken out within 30 hours after it is inserted into the vagina.