Place it at the very end of a short scare edit, after a calm setup clip, then follow it immediately with a relieved laugh or a calm voice line so the scene settles and the viewer knows the joke is over.