Place it at the start of a scene change to set up the joke, then follow it with Emotional Damage after a failed stunt or Goofy Ahh Sounds when the moment turns deliberately silly.