That's what you do with a drunken sailor
(The last line of this verse is followed
by "Amen")

According to the The Burl Ives Song Book the song is
representative of capstan chanties.

The shanty
was a tune designed to aid sailors in their work. Additional verses could be
created as necessary until the job was completed.

The capstan chanty was a moderate tune sung to raising the anchor. In
order to raise the anchor bars were inserted into the capstan and sailors would
walk around it, turning the capstan to raise the anchor. Sailors would stamp on
the deck on the words "Way Hay and Up She Rises."