I have no idea what the psychology is, but I almost always have some song or another running through my head, weather I'm calculating or not.
How to get rid of songs in one's head when playing chess
not quite Metasable!
Elaborating on this point, I will hear a song in my mind which I hadn't heard for a while. I would think a recently heard song on the radio, etc would pop up on the day but that isn't the case. I can't remember where I read it; Karpov mentioned once a song going through his head during a vital moment in one of his games.

Try listening to low-volume classical music through noise-cancelling headphones. Reasons below:
Low Volume: Loud music can disrupt your play
Classical: Statistically proven to increase mental capability
Noise-Cancelling: Most songs stuck in your head will be brought about by small noises that remind you of the song.

Try listening to low-volume classical music through noise-cancelling headphones. Reasons below:
Low Volume: Loud music can disrupt your play
Classical: Statistically proven to increase mental capability
Noise-Cancelling: Most songs stuck in your head will be brought about by small noises that remind you of the song.
While I agree with your post, I should point out that your second point has been shown to be false on numerous occasions - It's now little more than a commonly held belief.

Maybe you could go along with the music instead of fighting it. Sing along inside your head and it might go away.

I think the second point is relatively debated, but what shouldn't be debated is that the music choosen should not be a distraction and should be relaxing.
That, to me, means it should be relatively melodic, should not have lyrics, and should generate a low level of tension in the listener. So choosing your Queensryche/Fates Warning/Dokken playlist might not be the best option :)

I guess you cannot fight "ear worms". In various articles I have seen on the Internet nothing can be done about it. the harder you try to stop it the harder the song will play. Earworm
.uk/2010/05/how-to-kill-an-earworm.php
I think the best way to deal with it as you cannot stop - it is to somehow make it part of your flow. use it as a spark to get you in the mood to find the best move.

Josh Waitzkin describes it as well in the book art of Learning (great book). "you’re trying to think, but that one song by that one band keeps blasting away in your head. Waitzkin’s “only option was to become at peace with the noise” (p. 56). "
he writes that he found a way to think to the beat of the music.
@bobbyDK
thanks for the references. (Mange tak!)
I was just speculating if the light saber scene music might have been some sort of association between the tough battle I was playing and the fact I love all the light saber fights in the Star Wars films; I can see it now - forget chess boxing and introduce chess light saber duals.
It's nice to read the feedback because I was thinking it was just me being not as focussed as I should be.

One Friday night I saw David Bowie on the TV show Soul Train "perform" (the lip synching was horrible, but then it isn't an easy one to lip synch) the song 'Fame'. The next day I played in a weekend tournament and the song was stuck in my head the entire time. I won the tournament.
In a tense attacking game, with play on both sides, the music from Star Wars: the Phantom Menace (Qui Gon and Obi Wan face Darth Maul) played on my internal tape cassette.
It's an annoying thing for me to suddenly have a piece of music running through my head when I ought to be calculating.
Anybody know the psychology behind this?