Appearing only in the unabridged version of Stan Hugill’s Shanties from the Seven Seas, this song is one of those marginal little bits thrown in due to Hugill’s extreme inclusiveness and, perhaps, his willingness to look at songs popular right up to his day. I’ve not seen “Goodnight, Ladies” attested as a chanty elsewhere, though Hugill's presentation appear to be authentic.
It works fine as a capstan chanty, functioning like the recently discussed “The Arabella” and “The Saucy Rosabella” in that each verse simply consists of a line sung three times, followed by a common refrain and a grand chorus. It takes little imagination and even less memorization to sing. I call it the “hokey pokey” style of chanty.
“Goodnight, Ladies” originated as a popular song that, at some point, seems to have gotten associated with seamen.
The popular song itself seems to have developed from different sources. E.P. Christy’s minstrel genre composition of 1847, “Farewell Ladies” is the origin of the chorus of “Goodnight Ladies.”
As far as anyone has been able to determine, the “merrily we roll along” part turns up by 1867, in a Yale University songbook—with reference to the yacht club. Was it part of an earlier folk ditty? Though it shares a melody with “Mary Had a Little Lamb,” the understanding is that “Lamb” was patterned on this, not the reverse.
The work lyrics at the beginning are not contained in the college glee version. This leaves open the question of whether they had been a part of the “Merrily” song or whether sailors added them. Sailors would have also changed the Yale version’s “…o’er the dark blue sea” to what we have here, “…on the good ship XYZ.”
In this case, it's the good ship Hulton Clint.
Merrily rowing and rolling along,