However, due to the properties of water, the sound of the wave would actually be amplified, which would almost certainly cause temporary or permanent deafness. Water easily transmits shock waves, so if you are underwater and in a trench it protects you from infrared and gamma radiation, the shock wave can still kill you, depending on the distance the explosion is at, the altitude of the detonation and the size of the bomb. After all, little of its power would be reflected because the body's density is similar to that of water. Gaseous deflagration in continuous water is a complex problem involving chemical and biphasic flow reactions between gas and liquid, making it difficult to capture the variable dynamics of the flame and the disturbance of water flow in a single experimental study.
Unfortunately, calculating how much energy is reflected and how much is transmitted when a shock wave hits water turns out to be a very complicated problem, not something that can be learned and solved in a week ;-) Still, there are some qualitative things I can say about the process. Shallow underwater explosions are those in which a crater formed on the surface of the water is large compared to the depth of the explosion. While gasoline could only break the nearest disc above water, ammonium nitrate broke all discs and dynamite broke all discs except underwater disks located 15 meters away. A 1-ton nuclear bomb placed on or near the surface will vaporize a large amount of water, possibly transforming it into hydrogen and oxygen, plus everything else dissolved fragments.
Anyway, the myth is that by diving underwater, you can escape injuries caused by an explosion that occurs above the surface. I don't think being underwater will help counteract the UV pulse of a nuclear weapon (water is almost transparent to UV rays at a depth of a few meters and would heat up to lethal temperatures anyway) or against the firestorm. For their large scale test, the Mythbusters hung rupture discs 5 feet above water, 5 feet below water and 10 feet below water at intervals of 5, 10, 20 and 50 feet away from the explosives. The first interface (air-water) reflects a certain amount of energy, is deposited on the interface and a certain amount is transmitted.
An example of a deep underwater explosion is the Wahoo test, which was carried out in 1958 as part of Operation Hardtack I. For your particular question, I think you would have to stay underwater for a long time until the radiation dissipates. It is to be expected that something similar will happen if the wave hits the surface of the water, since, compared to air, water is very “technically hard”, it has a very low compressibility. The water doesn't compress well, and the deeper it sinks, the more pressure it puts on the helmet.
If we add to that a strong gust that further “pushes” the water downward, it will attempt to collapse all the air pockets to help “alleviate” the pressure. If you're hit by a pressure wave in water that originated in the atmosphere, there's an interface change on the surface of the water and a second interface change in the lungs.