I once saw a news story and they called them ear worms. When u get a song stuck in your head and can’t get it out; that’s an ear worm.
http://en.wikipedia.org/wiki/Earworm
I’ve had Insomnia in spite of my sleeping pills (Lunesta). I recently made a realization. As i try to fall asleep, I’ll realize that I am drumming out the rythm of a song that is stuck in my head. It’s always one of the upbeat songs from the Katamari soundtrack. Katamari is video game and the music is sung in Japanese.
Last night I finally slept well. I took a benedryl on top of my lunesta (not sure that’s safe), and went to sleep with my iPod and turned on the track “Baby Sleep Now” which I had downloaded off iTunes (I think for free) when M. was snoring terribly and THAT was causing me not to sleep. See here:

I slept really well.
But when I get up for my 4th hour bathroom run, I realized that the damn Katamari music was in my head AGAIN. So I just made sure to put the muic on when I went back to bed. I slept great.
I was talking to my mom on the phone just now and as I was talking to her I realized something. I’ve had this happen before and it was when I was first getting into Indian music and I had found this really great albm (the Taal soundtrack by A.R. Rahman)….

… and the same thing happened then. I had the upbeat tracks in my head AT ALL TIMES. It’s like a subconcious obsession. So I made a connection in my head while talking to my Mom… I think it’s when there is music that is UPBEAT AND IN A FOREIGN LANGUAGE that this happens- gets stuck in my head to the point where I can’t even sleep. I think what’s happeneing is that my brain is trying to make sense of what it’s hearing and it can’t cuz it’s in a language it doesn’t understand. So it goes over it over and over and over. And it theoretically won’t ever stop until I learn what it’s SAYING. While talking to my mom about this I ALSO remembered that I tend to do this with English words that I hear for the first time and don’t know what they mean. For example, a multi-syllabled word like “copasetic”. When I first heard that word I didn’t know what it meant. And for days and days I was (without realizing it) saying it my head OVER AND OVER AND OVER. It didn’t stop until I figured out what the word meant.
I also do this with foriegn words. Like “Ahmadinejad“. I hear that name in the news all the time but I am not sure exactly what they are saying. So for days on end my brain is going “aba-jin-a-dad?” “aMA-jin-a-dad?” “ama-jin-a-BAD?” Until I can either figure out how to pronounce it. Until then, I CAN’T STOP repeating it over and over in my head, and it’s involuntary. It’s subconcious. It’s like a conversation going on in another room and you know they’re talking but only sometimes can you actualy hear the words.
So… The solution? Idunno. Right now I am listening to upbeat English music. This way if it’s in my head, my brain won’t obsess over it like it would if it didn’t understand the words.
So… Ear Worms. Do Ear Worms cause insomnia? It seems to, at least for me. I should look online and see how common this is.