And why certain tunes get stuck there in the first place.
Credit: Getty Images

There's a song on replay in my head. It's not a popular, make-you-want-to-jump-up-and-dance song like "Uptown Funk." It's not some tune with a catchy hook like "All About That Bass." No, the song on replay in my head is an absolutely depressing song from the seventies. I blame Saturday Night Live, for starters.

My husband and I watched the SNL 40th Anniversary Special over the weekend. Right after, we decided to check out the show's first episode. Musical guest star Janis Ian sang her 1975 hit At Seventeen, a song about an adolescent ugly duckling. It contains upbeat lyrics such as "To those of us who knew the pain, of valentines that never came, and those whose names were never called when choosing sides for basketball." I recalled the song from childhood. My husband had fallen asleep and as I listened, I got a little weepy lying there in the dark.

Not the sort of song you'd wake up revved to hear, eh? Oh, but it was. I jumped out of bed and watched the YouTube video several times in a row. "Ugh, what is that?" asked my 10-year-old. "It sounds sad." I acknowledged that, indeed, it was. Then I listened to it again. Then I sang it in the shower. Then I hummed it to myself on my commute to work. At one point, I actually sang bits of it out loud on a New York City subway, because that's exactly the sort of thing you can do on a New York City subway. Luckily, I was able to repress the urge to belt it out during an office meeting.

What was going on?! Actually, I discovered, there's a word for songs that get into your head and won't leave: earworms. As neuroscientist and musician Daniel Levitin, PhD, has noted in a podcast, the songs "tend to be simple melodically and rhythmically…the kinds of songs that the popular radio stations play and overplay." Which would explain why, say, "Who Let The Dogs Out" might infest your mind (it's one of the top-ranked earworms), but not some angst-ridden teen ballad.

Lady Gaga tunes commonly get stuck in people's heads, finds research in the journal Applied Cognitive Science. As a Google search reveals, other contenders for best (or, rather, worst) earworms of all time include (LISTEN AT YOUR OWN RISK):

"It's a Small World"

"My Humps," by The Black Eyed Peas

"Mickey," by Toni Basil

"Time Warp" from The Rocky Horror Picture Show

"Ob-La-Di, Ob-La-Da," by The Beatles

More online digging revealed that an earworm episode can be triggered by word memory association, mood, stress, or being in an "emotional" state, per a 2012 study in the Psychology of Music. Ah, that made sense. I'd been kind of bummed during the Saturday Night Live special about how geriatric Chevy Chase, Bill Murray, and Paul McCartney seemed—reminders of my own aging. Perhaps that sadness had made me vulnerable to getting infected by a song. Oh, and I further reinforced my obsession with it by Googling around for factoids (the character Janis Ian in Mean Girls is named after the singer).

Some say the cure for an earworm is to push it out with another song. This morning, I walked by a restaurant that had music piped outside and "Love Shack" was playing. Tunes don't get much catchier than that, but it didn't work. The best suggestion I've found, from that study in Applied Cognitive Psychology, is focusing on a consuming cognitive task. As the authors note, "If the mind is fully engaged, then there may be fewer resources remaining for intrusive thoughts." Reading a book or doing a crossword puzzle could do the trick. Indeed, as I typed this, the song stopped playing in my head.

In my experience, earworms simply run their course—usually a couple of days, max. I've actually, in a warped way, enjoyed these bursts of wallowing. I just hope I can avoid spontaneous karaoke in the office break room.