From Wikipedia ...
“Suicide Is Painless” is a song written by Johnny Mandel (music) and Mike Altman (lyrics) ... Mike Altman is the son of the original film’s director, Robert Altman, and was 14 years old when he wrote the song’s lyrics. During an appearance on The Tonight Show Starring Johnny Carson in the 1980s, Robert Altman said that his son had earned more than a million US dollars for having co-written the song while he only made US$70,000 for having directed the movie.
The song was written specifically for Ken Prymus (the actor playing Private Seidman), who sang it during the faux suicide of Walter "Painless Pole" Waldowski (John Schuck) in the film's "Last Supper" scene. Robert Altman had two stipulations about the song for Mandel: first, it had to be called "Suicide Is Painless" and it had to be the "stupidest song ever written." Altman tried to write the lyrics himself, but found that it was too difficult for his 45-year-old brain to write "stupid enough." Instead he gave the task to his 14-year-old-son, Michael, who apparently wrote the lyrics in five minutes.
Altman later decided that the song worked so well, he would use it as the film's main theme, despite Mandel's initial objections. This version was sung by uncredited session singers John Bahler, Tom Bahler, Ron Hicklin and Ian Freebairn-Smith (the vocals are sometimes misattributed to Johnny Mandel, due to his being the only name officially credited for the song).