I think bosun, from boatswain, derives from the same root that gives us swain in other contexts, meaning mate - from Old Norse sveinn (someone please correct if this is inaccurate)

So referring to 'the Bosun’s mate' was actually saying “the Boat’s Mate’s Mate”, which takes us over the water to the Double Genitive thread.