It was likely Melville's favorite. Chapter 40 of "Moby Dick" has the midnight watch singing this. It's mentioned again in “White Jacket,” and the poem “Tom Deadlight."