Harry Nilsson, 52, Grammy Winner

LOS ANGELES - Harry Nilsson, who earned a Grammy for singing the theme to "Midnight Cowboy" and wrote songs for some of the biggest names in pop and rock 'n' roll, died yesterday. He was 52.

The singer-songwriter died in his sleep at his home in the Los Angeles suburb of Agoura Hills, said his manager, David Spero. Nilsson, whose real name was Harry Edward Nelson III, had been recovering from a massive heart attack he suffered last Valentine's Day.

Nilsson, who often gave his compositions a quirky, satirical touch, won a Grammy award for best male contemporary vocal in 1969 for "Everybody's Talkin," the theme song to the Academy Award-winning movie "Midnight Cowboy." He also won a best male pop vocal Grammy in 1972 for "Without You."