"Over the Rainbow" was a song that Milo Clancey once sang to himself just prior to eating breakfast. (TV: The Space Pirates)
Lyrics
According to Clancey, some of the lyrics were:
Somewhere over the rainbow
Blue birds fly
Birds fly over the rainbow
Why then, oh why, can't I?
Behind the scenes
It's unclear whether the song was used legally. Obviously, the song would still have been in copyright in 1969, since it was only published in 1939. The credits, however, don't include a nod to the song's authors. Still, many songs are used perfectly legally on British television without receiving a credit in the end titles.