yes, the same thing happens to me, too. when i'm nowhere near the piano, that's when i get the get the greatest ideas for a melody or lyrics for a song. it usually happens at night or in a dream when i'm asleep. i once thought i sucked at composing songs, but then i realized that i CAN compose a song, but i never have time. that's why i'm trying to get a piano in my home, so that i can record the melodies so that i don't forget them.
and as for ATM, i learned most the song by ear, and the parts i didn't know i improvised, [like a lot of her other songs] like the verses, and it sounds great. for a while now, i've been thinking about putting a demo tape together, and was thinking about making a demo tape full of cover songs and decided that it wasn't right, so i decided to put a few songs up there that were my own.