Green’s Dictionary of Slang

mariner’s grave n.

[rhy. sl.]

a shave.

[US]St. Vincent Troubridge ‘Some Notes on Rhyming Argot’ in AS XXI:1 Feb. 47: ocean wave. A shave. (English.) Also rare, if English. Both mariner’s grave and digging the grave are more usual.
[US]Wentworth & Flexner DAS.