Perhaps coincidentally, the opening riff of Martin's song bears a strong resemblance to the opening of the "Sesame Street" theme.
When Frasier and Niles are working on Martin's song, Frasier sings the lines "She's such a groovy lady, she makes my heart go 'hi-di-hey-di.'" He then stops and says, "Dad, I don't mean to criticize, but... you know that 'hi-di-hey-di'? It sounds like Cab Calloway sung backwards." Frasier is referring to bandleader Cab Calloway's song entitled, "The Hi-De-Ho Man," which Calloway performed in Hi De Ho (1947)
The scene title card "In the Wee Small Hours of the Morning" refers to a song written by David Mann and Bob Hilliard in 1955. It was introduced and made popular by Frank Sinatra on his album "In the Wee Small Hours" that same year.
John Mahoney played jingle composer Sy Flembeck on Cheers. It was this guest shot that convinced Kelsey Grammer to cast him as his father.
Martin's failed attempts at writing songs may be an allusion to John Mahoney's role as Artie in the play The House of Blue Leaves (1987). Artie also wrote songs that were never successful.