Boys at Sea is a study of homoerotic life in the Royal Navy during the age of sail. It deals not only with sex among ordinary crewmen, but reveals that the most consistent feature of prosecutions for sodomy and indecency involved officers forcing their attentions on ships' boys.
https://www.goodreads.com/book/show/1851650.Boys_at_Sea