In his case, a lot of these instances deviate from the norm of this trope in that the switch is deliberate on the part of the other involved party.
The Justice League had an issue where this happened with all the core members getting mixed up with each other. The big spoiler was when it turned out that Superman didn't end up in Batman's body but in Kobra's and Kobra pretended to be Superman trapped in Batman's body.
There was an interesting case in the Superman tie-ins to Infinite Crisis. During their titanic tussle on Earth-2, Superman and Kal-L end up reliving each other's lives, but start altering it. For Superman, revealing his identity to the Senate would end up leading to a future where Earth-2 was totally unprepared for the Anti-Monitor, leading to him being crushed like a bug. For Kal-L, calling out Batman's bluff during the Man of Steel mini-series and snapping Doomsday's neck and just not dying leads to a world where a superhuman war destroys the planet. They both think that the other world is the one that can't exist.
Superman Vol 2, #181 deals with Superman and Bizarro's brains being swapped by Manchester Black.
In a Power Girl story, villain Ultra-Humanite swaps bodies with Power Girl's friend Terra.
The DC ComicsSilver Age megaseries by Mark Waid involves a villain called Agamemno swapping the Justice League of America's minds with the Legion of Doom. This means that all the powered heroes have lost their powers, and even the unpowered ones have lost some of their abilities (Batman is stuck in Penguin's unathletic body; Green Arrow complains that Felix Faust has lousy eyesight, spoiling his aim).
Wonder WomanVol 1: When Zenna Persik realizes she's been captured by her old foe the Nazi Karl Schlagel she swaps her mind out with that of an unsuspecting Black Canary who had been following their chase trying to figure out what was going on and apprehend them.
In the run up to Amazing Spider-Man 700, Doctor Octopus inflicts this on Spidey - with the added problems that Ock's body is a) in prison and b) on its last legs after years of punishment, only barely kept alive by life support. How does Peter get out of it? Well, he kind of... doesn't. He manages to get himself out of prison, but eventually dies inside Doc Ock's body, but not before making Ock make a HeelFace Turn, and after Peter dies, Ock vows to be a better Spider-Man than Peter ever was. A Superior Spider-Man, if you will.
It was later revealed that Peter's mind was still in his own body while Ock was in control of it, combining this trope with Grand Theft Me. Ultimately, after Green Goblin set out to destroy everything Ock accomplished as Spider-Man, Ock conceded that Peter was the true Superior Spider-Man and erased himself from Peter's mind, allowing Peter to get his life back.
Doctor Doom learned the trick of switching bodies from a benign alien race called the Ovoids. He first used it quite successfully on Mr. Fantastic in Fantastic Four #10 (1963) but not that often afterwards.
Though it did save his life in the 1980s, when Doom's body was disintegrated in a battle between Terrax and the Fantastic Four. He switched bodies with a bystander at the last second.
In a hilarious case of Didn't Think This Through, Doom once switched body with Daredevil and threw him in a prison cell, but didn't tell his men about this plan beforehand. As a result, Daredevil is released from prison by Doom's men, and declares war on all of Latveria's neighbours, forcing Doom to switch his body back in order to avoid an international incident.
In a What If? story, "What If Tony Stark Became Doctor Doom?", Victor Von Doom and Tony Stark were college roommates, until Doom trapped Tony in a mind-transfer device, taking the precaution of wiping Tony's memory before swapping minds with him. Doom, in Tony's body, took over Stark International(possibly killing Howard Stark to achieve that end) and became a hugely successful Corrupt Corporate Executive. Stark, meanwhile, in a neat subversion of Easy Amnesia, never regained his memories but retained his intellect and achieved several doctorates under the name Victor Von Doom. As Von Doom, he started his own company in Latveria, and developed his own powered armor, which he used to counter "Stark" when he tried to destroy Von Doom Industries with his own powered armor. On the verge of defeat, Doom offered to restore Stark's mind to his body in exchange for amnesty, saying, "I can give you your family name back." Stark refused, saying, "You have made the name Stark synonymous with corruption and corporate avarice. Why would I covet that?"
In one Excalibur story, the whole team (well, mostly) was flipped with their enemies the Crazy Gang, using a device invented by Tweedledope, a member of the villain team: Captain Britain with Tweedledope, Meggan with the Knave, Nightcrawler with the Jester, and Phoenix with the Executioner. Presumably, the villains intended to flip shadowcat with the Red Queen, but Shadowcat escaped. Captain Britain was able to somehow access Tweedledope's skills to use the device and reverse the effect (after the usual hero-villain-free-for-all, naturally).
The best-known example would be the tragic flip of Psylocke and Chinese assassin Kwannon. The latter had been rendered braindead after a fall, and when Psylocke turned up amnesiac in China, Kwannon's lover Matsuo saw a chance to restore his girlfriend and turned to the villain Spiral for help. However, Spiral—being Spiral—decided that switching the women's minds would be far more entertaining, and gave both women certain aspects of the other. As a result, Psylocke got Kwannon's martial arts skills while Kwannon's mutant empathic power was given a boost by Psylocke's superior telepathy. Kwannon later joined the X-Men herself as Revanche, but would later commit suicide after contracting the Legacy Virus (aka Mutant AIDS). This used to be one of the few examples of the flip being permanent due to the extent of Spiral's tampering with the women's minds and genetic makeup, only being undone after 20 years.
Emma Frost was rather fond of this one. While still a full-time villain she swapped bodies with Storm as part of an evil plot; years later, just before her switch to heroism, she accidentally swapped bodies with Iceman, and then proceeded to fuel his (already significant) insecurities by using his powers far more effectively than he ever had. She also tried to commit suicide while in his body, but she never mentions that — and considering she's not above using her telepathic powers to make you vomit uncontrollably whenever you hear the word "broccoli", you probably shouldn't either.
Lampshaded in X-treme X-Men once, when at a dinner party, various team members start teasing Ororo, until Kitty stands up and says, "What's everyone talking about? That isn't Storm, I'm Storm! Someone has switched our minds!" Everyone else suddenly glares at her in panicked silence. Then Ororo and Kitty shout, "GOTCHA!".
During the X-Men's Australian run, there was an issue where Dazzler was accidentally switched with the criminal Diamondback. But unlike most hero/villain swaps, neither had any idea what was going on and Diamondback briefly joined the X-Men to get the matter sorted. Besides the clumsiness in getting used to each other's abilities (somehow Diamondback's Improbable Aiming Skills didn't work in Dazzler's body), Dazz was understandably quite pissed when Diamondback smoked cigars and slept with Wolverine in her body.
Also happened in an Ultimate X-Men/Ultimate Spider-Man crossover, when Jean Grey got so pissed at Wolverine's constant attempts to woo her that she sent his mind to the one place he wanted to be least... High School. He ends up spending a day in Peter Parker's body, even attempting to "get busy" with MJ, while Peter, in Logan's body, went from one bad situation to another. He was understandably upset when Jean came to fix things. Then, just when it's finally over, MJ asks him if they can wait until they're older to do what "he" tried earlier.
This issue was loosely adapted as "Freaky" in the Ultimate Spider-Man cartoon, with the main difference being that Mesmero was the cause of it.
In Ultimate Fantastic Four, Doctor Doom blackmails Reed into switching bodies with him during the "Frightful" arc. Reed turns it around by attempting to pull a Heroic Sacrifice, and revealing the truth just before doing so: Doom reverses the switch rather than let Reed take the credit.
Sleepwalker and his human host, Rick Sheridan, ended up switching bodies for several issues after a botched attempt to release Sleepwalker while Rick was awake. In Sleepwalker's body, Rick ended up battling supervillains and supernatural horrors of the Mindscape, while Sleepy had to fill in for Rick in his human life, ironically having more success with women than Rick himself. The body swap was, in fact, a key part of the Evil Plan hatched by Big Bad Cobweb to invade the Earth and make Rick think Sleepwalker was the invasion's leader, hindering any attempt Sleepy might make to stop him.
Happened in All-New Wolverine's first Annual, when Laura swaps bodies with Spider-Gwen. The two go on an adventure to fix it, leading to the hilariously painful moment when Gwen-in-Laura's-body tried to make use of the claws, only to stab herself in the head and pass out from the pain.
Happens to Spider-Man yet again, this time with Kamala Khan in an issue of Marvel Team-Up. While the switches temporarily reverse due to an implant within Spidey's body - a precaution in case this would ever happen again, it doesn't change the fact that they're forced to spend a lot more time as each other. This leads to the usual hijinks with regards to adjusting to new powers and living different civilian lives with mixed results. Both sort of appreciate being older/younger, but have some difficulties getting around the other areas; Kamala horribly fails at impressing for a job interview due to her lack of Peter's smarts and learns about the various bills and loans he has to pay off to stay afloat, while Peter in turn not only has to deal with being a different gender, age and ethnicity (being on the receiving end of racist jokes poking at Kamala's Pakistani heritage, understanding Urdu, going through her period in the middle of class, etc.) but botches her biology presentation — ironically enough, by plagiarizing from himself.
In one issue of ALF's comic, he swaps personalities with Kate when she calls the Vulcan mind meld silly.
Archie and Mr. Weatherbee in one issue switch bodies due to screwing around with one of Dilton's machines. It only lasts for a day, but that's well long enough for Archie to screw up Mr. Weatherbee's speech and The Bee to make Veronica furious at ol' Arch.
Speaking of Veronica, one issue of her own book featured a mystical pendant that swapped her with her own mother for a day. The two need to attend a fancy party together, and predictable shenanigans ensue. After that, the two just decide to wait it out, and pass the time with card games long into the night.
The crossover comic Harley & Ivy Meet Betty & Veronica involves Harley and Ivy swapping bodies with Betty and Veronica respectively, due to magical spells by Sabrina and Zatanna.
Adam Warren's Amerimanga version of the Dirty Pair did this to themselves on purpose during the "Run from the Future" miniseries.
A variant occurs in Double Jumpers. The development team working on Dungeon Lords 2 ends up swapping personalities with their programmed in-game avatars. Now they need to figure out how to get home while the characters in the game are running around in their bodies.
During Fred Hembeck Destroys the Marvel Universe, Crackers (the comic's version of The Grim Reaper) decides to switch the minds of Prince Namor the Submariner and Zzzax the Living Dynamo, resulting in Namor getting zapped to death by a electric outlet and Zzzax diving into a tub of water.
Iznogoud: In "Chop and Change", a wizard invents a magic bowl: whenever two people drink consecutively from it, they exchange souls. Hilarity Ensues when this new invention gets tested by several patrons in an inn, just for fun. One of the catches is that it doesn't have to be actually people who drink: animals count too. (The wizard himself ends up in the body of a parrot.) Or even inanimate objects, for that matter.
In Super Sonic Special #12, Sonic and Knuckles switch bodies thanks to a scheming Dimitri and fake Robotnik, in order to blackmail them into getting the Master Chaos Emerald.
Happened once in Issue #37 of the Sonic X comic, in which Sonic and Dr Eggman switched bodies. Truth be told though, neither took real advantage of it, despite the cover suggesting more heinous actions by Eggman (in Sonic's body). Eggman in Sonic's body is unable to control Sonic's speed, while Sonic in Eggman's body has a hard time driving the Eggmobile. The story is resolved when the two use the ray Eggman used to swap their bodies to swap back. Eggman's comedy relief henchmen, Decoe and Bocoe tie up Eggman in the end, believing he is still Sonic, and interrogate him.
A variant occurs in Safe Havens: Samantha and Dave accidentally drank DNA samples the dodos had left out instead of their drinks, and ended up turning into each other. The night before their wedding, no less.
One Uncle Scrooge comic book had Magica swap bodies with Scrooge in order to steal his number one dime. Of course Scrooge is then able to access Magica's own hoard of magic tricks and use them against her.