The song "Fireflies" by Owl City was written because of singer Adam Young's insomnia.
Young says that the disorder is both a blessing and a curse because while 3-5 hours of sleep per night allows him to be more productive, inspiration frequently tends to strike just as he is about to sleep. One of these sleepless nights in front of his keyboard yielded the smash hit "Fireflies." Young says that he was simply fooling around and not trying to write anything - the song just developed over a couple of hours. He didn't even realize it had the potential to be a hit!
(source)
