Place it at the end of a reveal, after It Was At This Moment He Knew sets up the twist, so the laugh lands as the payoff. If the plan then backfires, follow it with Fail Sound Meme to flip the joke.