Cooper applied for compensation shortly before his death, saying his cancer was due to his smoking and exposure to passive smoking.
The military's compensation commission and a review board both rejected the claim, saying his smoking was a personal choice.
However, their decisions were overturned by the Administrative Appeals Tribunal which ruled on April 6 that his smoking was caused by his military service and this his widow, Bronwyn Cooper, was entitled to compensation.
It said the military was not liable for all personnel who smoke but Cooper's habit was linked to his individual circumstances, including his age when joining and his easy access to cigarettes.
"A boy of that age who was living and working in a closed and strange environment would necessarily have been more susceptible to peer pressure and more likely to adopt the habits and culture of those he was living with to 'fit in' and to make life bearable," the tribunal found.
Referring to his personal circumstances, the tribunal stated: "His youth, distance from his family, rapid onset of smoking, length of service and easy access to cigarettes are all key factors in determining whether the deceased's smoking habit was caused by his defence service."
The tribunal noted that Cooper did not increase his smoking after leaving the navy in 2000 and eventually quit the habit in 2005.
The damages amount has yet to be decided.