In Ghosts of the Past, the sequel to Child of the Storm, this happens to a number of characters in chapter 2. The circumstances, however, mean that this is uniquely played for horror rather than comedy.
Another fanfic called In His Shoes, this one from the Rurouni Kenshin fandom, has Genius Bruiser Hiko and BishōnenFragile Speedster Kenshin swapping bodies during a sparring match and trying to avoid detection. Aoshi almost figures out what happened, detecting the switch but not realizing it wasn't an advanced training technique.
The infamous Body Swap Day at Absit Omen saw a fair chunk of Hogwarts' population randomly swapping bodies thanks to a breakfast-time prank. It wore off by dinner, leaving enough time for a few relationship revelations and a canceled Quidditch match.
At least a dozen different stories have involved body-swapping, usually as the result of a potions mishap or screwed-up spell. Popular choices include Harry/Draco Malfoy and Harry/Snape.
The Infinite Loops will sometimes shuffle Loopers around to different positions when they reboot.
Several of them occur over the course of Diaries of a Madman. So far they've been used for revenge, a competition to see who can act the most like the other, or have been caused by Twilight messing up a spell.
A Walk In Your Shoes has Lily and James experience this in their seventh year at Hogwarts with a twist of the understanding of the other being a prerequisite of changing back to thier original bodies.
Happened three times from Sinnoh to Unova-1, first with Jane and Palkia, the second time with DS and Artemis and the third with Daisy and Pink. A weird variation of this also seemed to happen between Jane and Entei.
Happens yet again with Anom and Wolf, due to a Manaphy. Unlike the other examples, it's played as a more serious major plot point rather than a brief joke, and lasted for pretty much the whole Oblivia arc.
This later happened in Kalos when a particularly "playful" Obscuric being decided to swap Mezzo and Eskay's minds. This ended up causing a small amount of chaos, especially when the fix turned out to be a kiss.
Deziree, Psyche, and Pentigan end up switching bodies for a brief period during the Fiore portion of Ranger-2.
In Princess Trixie Sparkle it's the driving conflict of the entire story: Twilight and Trixie are swapped body, Spike is switched with Rainbow Dash, Applejack is switched with Fluttershy, and Rarity is switched with Pinkie Pie.
Manaphy and its attack Heart Swap is often the catalyst for these types of plots in Pokémon fanfiction. (And even some non-Pokémon fanfiction.) Along with the aforementioned swap in the We Are All Pokémon Trainers roleplay, Manaphy is often responsible for swaps between trainers and their Pokémon, Ash or one or more of his companions (like here), or various characters in Pokémon Mystery Dungeon fanfics. There's even at least one (unfortunately dormant) fanfic involving Manaphy switching Eusine the Suicune-obsessed researcher from Pokémon Gold and Silver with Suicune itself, much to the latter's chagrin.
This is the essential aspect to Into the Blender where a MacGuffin causes the Mane Six plus Scootaloo and an OC to swap bodies while also affecting four other ponies in their vicinity. The goal is to retrieve the item in question and get everypony back to normal.
Superman: Okay, Des. Last time we met, you put me through a little teaching session. You held me back from solving some problems that you said people could solve themselves, that you said they needed to solve themselves. So. You're the one who played Body Snatcher with both of us?