Speaking to N.Y. Times correspondent Alan Riding in Berlin, The Lives of Others director-writer Florian von Henckle Donnersmarck tells where the idea came from:

Lives of Others costars Ulrich Muhe, Martina Gedeck, Ulrich Tukur, Sebastian Koch; director-writer Florian von Henckel Donnersmarck

“I was lying on the floor feeling miserable and thinking, `Oh, I’ve picked the wrong profession.’ Then I started listening to music and remembered Maxim Gorky, who quoted [Nikolai] Lenin as saying that Beethoven’s `Appassionata’ was his favorite piece of music. But Lenin said, `I don’t want to listen to it because it makes me want to stroke people’s heads, and I have to smash those heads to bring the revolution to them.’
“At that moment The Lives of Others was born.
“I suddenly had this image in my mind of a person sitting in a depressing room with earphones on his head and listening into what he supposes is the enemy of the state and the enemy of his ideas, and what he is really hearing is beautiful music that touches him. I sat down and in a couple of hours had written the treatment.”