Born in Sydney on 15 April 1933, Martin came from a long line of naval officers. He was descended from Lieutenant George Johnston, one of the Royal Marines of the First Fleet, and the convict Esther Abrahams. Their son Robert was the first Australian born person to enlist in the Royal Navy, which he joined in 1805. In 1942, when David was nine years old, his father was lost in action following the sinking of of which he was Deputy Commander.