Everywhere I was stationed in the Navy, (1958-1965) my service record and my medical record went with me. It contained all my personal history, home address, name of next of kin, who to notify in case of death, etc. I was a Radioman. I have transmitted from aboard ship by radio, (when on sea duty) and received by radio at shore stations (when on shore duty) death notices addressed to the Sailor's of Officer's next of kin with home address, etc. People got notified from ships at sea as soon as practical after the death.
Anything concerning a death at sea would be recorded in "The Ships Logbook's", (more than one log book on ships, and yes the US Navy still has the logbooks) the persons medical record, the persons pay record, (yes I think pay would stop that date of death). Lots of information recorded aboard a US Naval Ship at sea concerning a death in peace time. Same in war time, only difference, in war time you got buried at sea.
I do not know if large Naval Ships have a morgue or not. I do know all ships have freezers, and bodies were frozen until returned stateside, to whatever station, for whatever need/reason.
Deck Logs: Location
Held by The National Archives
Deck logs of commissioned U.S. Navy ships from the earliest times through 1940 are in the Old Military and Civil Branch, National Archives and Records Administration, 700 Pennsylvania Avenue NW, Washington DC 20408 [telephone (202) 501-5385. Logs from 1941 through those that are 30 years old or older are in the Modern Military Branch, National Archives, 8601 Adelphi Road, College Park MD 20740-6001 [telephone (301) 837-3510]. These logs are open for research. Requests for research appointments, and inquiries concerning log information, should go to the National Archives office holding logs from the time period of interest.
Held By The Naval Historical Center
Deck logs that are less than 30 years of age are in the custody of the Ships Deck Logs Section, Naval Historical Center, Building 57, 805 Kidder Breese Street SE, Washington Navy Yard, DC 20374-5060. All inquiries concerning deck logs that are less than 30 years old should be sent to the Ships Deck Logs Section.
Logs that are less than 30 years old are held in either paper or microfiche form, stored in the Washington National Records Center, 4205 Suitland Road, Suitland MD 20746. Logs from 1979 through February 1993 are on microfiche in the Ships Deck Logs Section. Logs from 1990 through 1993 are partly on microfiche in the Deck Logs Section, partly on paper at the Records Center. All logs from March 1993 are on paper and stored at the Records Center. All deck logs, whether they are classified or FOUO (For Official Use Only) must be sent to the proper authorities at SubPac, SubLant, SurfPac or SurfLant for declassification review or review and release determination before they can be researched or copied. Al Deck Logs that are less than three years of age must be sent to PacFlt for review and release determination.