Looking for information about homosexuality and the navy, particularly in regards to piracy in Victorian Era England.
Hans Turley's book Rum, Sodomy and the Lash: Piracy, Sexuality, and Masculine Identity basically asserts that homosexuality was attached to piracy as simply another moral deviancy in a long list. It was assumed these godless, kingless, ethically bankrupt people would naturally be sodomites as well.
Probably the Newport sex scandal has something to do with this perception in modern times.
edit - I just want to add that this age of sail homosexuality was viewed contemporarily as a sort of hypermasculinity. These men were seen as dominant, aggressive sinners who used sex as a weapon - probably not unlike modern prisons.
During the Age of Sail, many people considered it unlucky to bring women on board a ship. However, these voyages would still last months or years. People got horny.