This particular story is inspired by the round of D&D me and my friends played last night (me as DM), but any game would be acceptable.
So, for my own story:
My party has spent the majority of the campaign tracking down a Demon cult that wants to release the Demon armies to destroy the entire timeline, and have managed to track down their lair to an island that is known as the pilgrimage site for most of the worlds religions (using it to hide in plain sight essentially). They began looking around town to see if they could find any evidence, but the Bard in the party got distracted by the temple dedicated to the Bards goddess. He attempted to convince several of the other bards to help them....and rolled a Nat 1, leading to him being laughed out of the temple tavern. In order to have something to help heal his bruised ego, he hit up the magical infinite tap of enchanted wine and filled the remaining space in his Bag of Holding with the wine (about 700 lbs worth).
Eventually, the found the location and came up with their plan. The bard would use his Actor feat to disguise himself perfectly as a member of the cult and sneak into their hideout. Meanwhile, the rest of the party would be ready and waiting inside the magical orb the party has that has their own personal island and castle in a pocket dimension (they would be watching and jump out when the time was needed). The bard managed to BS his way in ("The adventurers we were supposed to be watching for?! They are here! I only barely escaped with my life, that is why I seem off. But luckily, they dont know where this location is."), and moved to the sacrifice chamber, ready to disrupt their ritual and save this timeline from Demon destruction.
The party pops out, ready to throw down, but the cult starts the ritual, which luckily for the party takes 1 minute to complete. The bard, still in his one surprise round, has a high enough passive Arcane knowledge to know how the circle works (at least on a basic principle), so he cast dimension door over to one of the people bound to be sacrificed and attempts to distract the cultist. He does this by......turning out his Bag of Holding and launching the wine at the guy.
...all 700 lbs...
Oh, did I mention that, as a magical substance, by my house rules the wine would be able to destroy the arcane circle (magic damages magic, unless otherwise hardened against such events)? I actually paused the game because I was laughing so hard, and I explained to the party that they just guaranteed the world was saved since the ritual now could not be completed. At which point we all started laughing. All because a bard filled a room about calf-deep in wine, for no other reason than "Lol, memes."
So, what are some instances for yourselves of situations that caused you to pause and say "That was so stupid, but somehow it worked."