The diaphragm can be put in up to 2 hours before having sex, and must be left in place at least 6 hours after sex. The diaphragm should not stay in longer than 24 hours.