No Marriage in open waters is legal. Regardless of sexual orientation. The way it usually happens for straight couples is, the captain or chaplin of the ship give a ceremony while in port, for the legal part. Then at sea, they have a "ceremony" that is formal. Then they are legally married since it was done in port in US waters.
So unfortunately, no. Not sure how it is for other countries.