The 76m-long (250ft) Petrel became dislodged and tilted by some 45 degrees while being worked on in Imperial Dock in the Port of Leith at around 8.30am on Wednesday.
Texas-based engineering firm Oceaneering, which operates the vessel for the US Navy, confirmed its staff were among those on board when the incident happened.
A total of 23 people were treated in hospital with a further 12 receiving treatment at the scene. Five remain in the Royal Infirmary of Edinburgh and two in hospital in Fife.
An HSE spokesman said: “We will have inspectors at the scene today to begin an investigation into this incident, working with Police Scotland.”
An Oceaneering spokesperson said: “The safety of our employees and the communities in which we operate is our utmost priority. Company personnel were aboard at the time of the incident.
"Immediately upon learning of this incident, and consistent with our stringent safety policies and incident protocols, we initiated an internal investigation and are working closely with the appropriate authorities for a full investigation of the matter.”
The US Navy said the vessel is a “multi-purpose maritime operations ship” which is “capable of supporting oceanographic surveys”.
Its spokesperson said: "The Navy procured Petrel in September 2022 to support our efforts in maritime domain awareness.
“We are working closely with the on-site authorities, who are in the best position to help those in need and to provide status updates.
“We will continue to communicate with our contacts at the scene in order to understand what occurred, the actions being taken, and the long-term impacts.
“Our thoughts and prayers are with those injured and their families, with hopes for a quick and full recovery."
The vessel, was previously bought and outfitted by the late Microsoft co-founder Paul Allen before being sold by his estate.
It had been moored in Leith since September 2020 due to “operational challenges” from the pandemic, according to a statement on the vessel’s social media page.
Mr Allen bought the ship to locate historically significant shipwrecks and it discovered around 30 sunken warships, including the Japanese Imperial Navy’s IJN Musashi.
A wind speed of 38mph was recorded in Edinburgh at 8am on Wednesday while a 44mph gust was recorded at 9am, according to Met Office data.
James Walsh, 39, a scaffolder on the dock, describe the moment when the ship tipped over in high winds as “so scary”.
He was working nearby when he heard a “loud noise” and recalled: “It wasn’t as noisy as you would think, for the catastrophe that it could possibly be."
Port chaplain Pauline Robertson, from the Sailors’ Society, said the incident was “just horrific” and added: “Those that witnessed it, it’s so much to take in. It’s surreal in so many ways and it’s a lot to process.”