SpongeBob is shown at the Krusty Krab during closing time with Mr. Krabs and Squidward. He is in the kitchen and starts singing a song. Squidward gets annoyed because SpongeBob is singing that song. Mr. Krabs comes and says to mop the floor. Squidward tells SpongeBob again to stop singing that song. Squidward then puts on the radio, but is playing "Musical Doodle" - SpongeBob picks up the radio and starts dancing and singing to it. After it ends, SpongeBob sighs happily and says "Musical Doodle." Next, Mr. Krabs says it's closing time again and Squidward runs out saying "Freedom!". SpongeBob is sitting down on a table singing to the song. Mr. Krabs yells "SPONGEBOB!" SpongeBob floats out of the Krusty Krab and lands outside a record shop. He hears "Musical Doodle" playing. He then buys the record and goes home, opens up Gary's shell revealing a record player, and plays the song until bed-time. SpongeBob says "Come to bed when you feel like it." He goes to sleep but then starts whistling the song. He goes back downstairs to listen to the song again.
He is then shown at the Krusty Krab the next day, looking very tired. Mr. Krabs warns him to get to work. Mr Krabs hears SpongeBob singing the "Musical Doodle." He is warned to stop singing that song again, but finds it very hard to not sing the song. He hands out Krabby Patties while singing the song, annoying the customers. Mr. Krabs comes out of his office to see what's wrong. All the customers blame SpongeBob for annoying them. Mr. Krabs warns SpongeBob once again to stop singing that song, or he will send him home. In the kitchen, his eyelids form into mouths and start singing the song - the same thing happens with his back.
In the next scene, the kitchen is shown absolutely wrecked, with "doodle" written on the walls and everything else is wrecked as well. Also, there is condiments and patty batter all over the wall. After Mr. Krabs tells SpongeBob to leave, SpongeBob seems that he has completely lost it. He goes home while singing the song - Sandy, Mr. Krabs, Patrick and Squidward follow him, tie him to a chair and gag him. Sandy explains that he has an "Earworm" - An infection in which the person is stuck on a catchy song and is unable to stop singing, the more the person sings the song, the more infected and stronger the infection gets and more crazier the person gets. Mr Krabs wanted to just pull the earworm out but Sandy says that they can't do that or else it will damage his brain and it can only be cured if another song gets stuck in their head. Mr. Krabs sings a sea-shanty and Sandy sings a Western song, but none succeed. Sandy says "someone with musical talent" can cure him (is this case, Squidward). Squidward starts playing his clarinet. The earworm gets annoyed and leaves. Squidward is then shown in bed, praising himself. The earworm comes and goes into Squidward, and now Squidward has the earworm and humming his song. Squidward then screams loudly as the episode ends.
( ‣ ) Associated production music
( • ) Original music
( ◦ ) SpongeBob music
•SpongeBob History Song - Nicolas Carr, Sage Guyton, Jeremy Wakefield [title card] •Steel Sting - Jeremy Wakefield [Squidward groans] ‣Sailor's Sting 5 - Michael Bolger, Nicolas Carr ["What are you doing? It's closing time!"] • ? - Jeremy Wakefield [Squidward cleaning the cash register] •Comic Walk - Nicolas Carr [SpongeBob mopping the floor] ◦Musical Doodle - Casey Alexander, Zeus Cervas, Eban Schletter [plays on the radio] ‣Sailor's Sting 3 - Michael Bolger, Nicolas Carr [Squidward quickly leaves] ‣ ? [harp music as SpongeBob floats] ◦Musical Doodle - Casey Alexander, Zeus Cervas, Eban Schletter [plays on a record] •Hawaiian Trax - Sage Guyton, Jeremy Wakefield [SpongeBob comes home] ◦Musical Doodle - Casey Alexander, Zeus Cervas, Eban Schletter [plays on record] ‣Hawaiian Link (b) - Richard Myhill [Gary sleeping] ‣On the Beach - Kapono Beamer [SpongeBob goes to bed] •Vibe Sting - Nicolas Carr [SpongeBob's eyes open] •Lap Steel - Nicolas Carr ["Oh, fine."] ◦Musical Doodle - Casey Alexander, Zeus Cervas, Eban Schletter [plays on record] • ? - Michael Bolger, Nicolas Carr [the next day] •Drama Sting - Sage Guyton, Jeremy Wakefield ["SpongeBob, wake up!"] • ? - Michael Bolger, Nicolas Carr [bucket of patties] ‣Steel Sting (h) - Jeremy Wakefield [SpongeBob laughs nervously] •Harp Ding - Nicolas Carr ["That's it!"] ◦Musical Doodle - Casey Alexander, Zeus Cervas, Eban Schletter [SpongeBob annoying customers] ‣Danger HQ - Norman Dane [Krabs wakes up] • ? - Michael Bolger, Nicolas Carr [Krabs tells SpongeBob to stop singing] ‣Tragic Bridge 2 - Phillip Green [SpongeBob going nuts] ‣Agitation Bridge 3 - Phillip Green ["What in blazes are you doing?"] ‣The Shock A - Dick de Benedictis ["Trying to escape is futile!"] ‣Mutations 2 (a) - Trevor Duncan [SpongeBob crawling home] ‣Shock - Cor Bolten [SpongeBob on the ceiling] ‣Lonely Stranger - Laurie Johnson ["Just as I thought."] ‣Danger Man 2 - Norman Dane ["Let's just rip the little sucker out."] ‣The Irish Washerwoman - traditional[Krabs' sea shanty] ‣Steel Sting (d) - Jeremy Wakefield ["I'll be darned if anybody can resist a Western song..."] ◦Life on the Prairie - Casey Alexander, Zeus Cervas, Eban Schletter [Sandy sings] • ? - Jeremy Wakefield ["That only seems to have made him madder."] • ? - Nicolas Carr, Barry Anthony [Squidward playing clarinet] •Skipping to School - Sage Guyton, Jeremy Wakefield [SpongeBob's cured] ‣Hawaiian Happiness - Jon Jelmer [Squidward goes to bed] • ? - Nicolas Carr, Barry Anthony [ending]
Sandy said they couldn't rip the earworm out, or it would damage SpongeBob's brain. However, she stuck her hand all the way into SpongeBob's head and put a hat on the earworm, nearly touching the brain.
To prevent anyone else from getting infected by the earworm, they could have just squished it before it infected Squidward.
This episode is similar to, and has the same premise as, the Dexter's Laboratory episode, Head Band. In it, Dee Dee has a song stuck in her head, thanks to a microscopic boy band in her ear. The song spreads to other members of the household, and finally ends when the band breaks up. Earworm is different, in that only SpongeBob gets a song stuck in his head and the culprit is in his brain, not his ear.
The scene where SpongeBob writes letters on the wall is a reference to "The Shining" where Jack (Jack Nicholson) is writing "all work and no play makes Jack a dull boy" on the walls of the hotel.
The ending is similar to the movie "The Exorcist," like when SpongeBob crawled like a spider around his house then inside the window.
"Earworm" is a real-life condition in which a song plays over and over in one's head. Like in the episode, a commonly used cure for earworm is to play another catchy song.
Although in "Plankton!" SpongeBob's brain is pink, this episode shows it his brain is blue.
Typically your eardrum prevents you reaching to your brain through your ear alone. Though it is possible that sponges don't have eardrums (hinted in "Blackened Sponge").