"Goodnight, funnyman"

Anybody know the origin of this phrase? People say it on the Innernet when someone dies but I seem to remember it from television or something; I just can’t place it.