It's morning again in Springfield, and Lisa wakes Bart up by pinching his nose shut until his struggle to breathe becomes too much for him. Her ulterior motive is to remind him that her birthday's coming up, in hopes that she'll finally get a decent present from him.
Homer is aghast to find all his white work shirts turned pink, thanks to Bart's lucky red hat slipping into the washday bundle of whites, and with no other choice wears one to work. He naturally stands out amongst his coworkers, and when Mr. Burns sees this on a security camera feed, he suspects that Homer may not be a sane man. Dr. Marvin Monroe assigns Homer a personality test that will determine his sanity or lack thereof, but Homer (never one for tests) desides to pawn off responsibility for completing it on Bart when both Marge and Lisa refuse. Bart answers ''every'' question "yes", and Homer is declared insane and shipped off to the local asylum.
Homer's roommate is an obese, bald man who's as yellow as he -- but he claims to be, and sounds exactly like, Music/MichaelJackson. Homer does not know who Jackson is, so he isn't put off by this stranger's claims, and they become friends. As the days pass, with "Michael" as his guide and support, Homer is put into therapy but doctors are put off by his wild rages whenever he is reminded of Bart (whom he holds responsible for his institutionalization). Eventually, when Marge convinces them that Bart is real, Homer's behavior is explained and he is declared "Not Insane" (complete with certificate).
"Michael" is only in the asylum voluntarily (owing to depression over the lack of Grammy nominations for ''Off the Wall'') and Homer and Marge invite him to dinner at their house. Unfortunately, Bart ''does'' know who MichaelJackson is and when Homer calls ahead to let him know about their plans, he quickly spreads word of their celebrity visitor to all of Springfield. The gathered crowds at their house are understandably underwhelmed when Homer, still unaware of what's going on, introduces "Michael" to them. Bart bears the brunt of the departing crowd's anger for his apparent hoax, but soon finds himself saddled with more-deserved guilt as well. Today was Lisa's birthday, and despite all her hopes and reminders, she didn't receive any gift from Bart at all.
"Michael", concerned, offers to help Bart write a song for Lisa; although the boy is bitter over his starstruck hopes being crushed, he realizes that "Michael" means well and overnight they compose "Lisa, It's Your Birthday", which they perform for her come sunrise. She's delighted, the rift is mended...and "Michael" drops his voice to reveal he's actually Leon Kompowsky, a New Jersey bricklayer who found meaning in his life when he discovered his talent for mimicking Jackson's voice and moves, which made others happy. The Simpson family wishes him a fond farewell as he heads out into the morning.
!!!This episode contains examples of:
* ButNowIMustGo: "Michael", at the end.
* ComicallyMissingThePoint: During a therapy session, a man suffering from agoraphobia speaks about his experiences. As he talks about the first time being unable to leave the house, however, Homer keeps interrupting him to ask if it was because it was raining or if the car was out of gas.
* EvolvingCredits: The theme music was re-arranged by Alf Clausen starting with this episode. This version of the theme song is still in use, and the animation (which debuted in Season 2) remained the same until the show went HighDefinition in Season 20.
* ForgottenBirthday: Bart forgets Lisa's, which only compounds her loneliness because Marge is preoccupied with Homer's release from the asylum that day.
* HaHaHaNo:
--->'''Homer''': So did I pass?
--->'''Mr. Burns''': ''(laughs)'' No.
* TheOperatorsMustBeCrazy: The hold music for the asylum is, in fact, the country music standard "Crazy".
* TheParody: Homer enjoys an ''AmericasFunniestHomeVideos''-type show where the finalists are the clips "Man Breaks Hip", "Dog on Fire", and "Baby with a Nail Gun".
* PenName: The real Michael Jackson indeed provided his own voice -- and had previously written the song "Do the Bartman" for the infamous tie-in album ''The Simpsons Sing the Blues''. But he was wary of appearing on a cartoon and in both cases went by the pseudonym John Jay Smith, with the producers legally barred from revealing it was really him. This was later relaxed and eventually, after many years of speculation, proven when the show did a "In Remembrance of.." repeat after Michael died.
** They're also completely open about it on the episode's {{DVD Commentary}}, causing a funny bit where they start talking about the fiasco and note that "apparently" it's okay to say it was Jackson now.
* PunBasedTitle: The episode title is a play on the phrase "stark raving mad".
* RealMenWearPink: Bart put his red hat in with the whites, making all of Homer's shirts pink. Homer didn't want to wear a pink shirt - not because he considers it unmanly, but because everyone else wears white shirts and he's "not popular enough to be different." His co-workers make fun of him, while Mr. Burns thinks he's up to no good. One psych form later, and he gets institutionalized.
* RecognitionFailure: A twist on this allows the whole plot to unfold -- since Homer doesn't know who the real Michael Jackson is and thus wouldn't recognize him if he saw him, he has no problem believing "Michael"'s story.
* ShoutOut: After Homer tells Michael he has no idea who he is Michael names several things that made him famous like "Thriller", MTV, Motown, and "Beat It", and then performs "Billie Jean", including his moonwalk dance.
** The madhouse scenes provide shout outs to ''OneFlewOverTheCuckoosNest'' and ''TheSilenceOfTheLambs''.
* SpecialGuest: MichaelJackson as "Michael Jackson"/Leon Kompowsky; credited as "John Jay Smith."
* UnintentionalPeriodPiece: The unbridled excitement surrounding the prospect of the real life Music/MichaelJackson coming to an North American town dates the episode to pre-August 1993. After Jackson was accused of child molestation in '93 and chose to settle the matter out of court, his reputation in the U.S. was permanently soiled, with his increasingly erratic and eccentric behavior overshadowing his fame as a musician. Tellingly, four seasons later NegativeContinuity results in Bart (an unabashed fan of Jackson here) telling Milhouse in "Bart Sells His Soul" that Jackson is, like the boogeyman, a fiction that adults use to scare children.
* TheVoiceless: Homer meets a fellow patient -- [[Main/OneFlewOverTheCuckoosNest Chief]] -- who's this. He immediately greets him and Chief responds in kind. As the doctors flock around him, he explains that nobody ever bothered to talk to him before, so he never spoke back.
* WhenIWasYourAge: Bart says he can't write a song for Lisa, because he's only ten years old. Michael then snaps back (in reference to his Jackson 5 years): "When I was your age I had six gold records!"
* YouHaveToBelieveMe: The doctors at the mental hospital believe Homer is making up Bart. Marge finally sets them straight.
-->'''Marge''': If you would just talk to my husband for five minutes without mentioning our son, Bart, you'd see how sane he is.
-->'''Doctor''': You mean there really is a Bart?! Good Lord!