Both of these are outstanding pro level cameras, and an experienced photographer would likely be very happy with either of these. By the time a photographer is looking at one of these cameras, they have likely already built up a collection of Nikon or Canon lenses and accessories and are pretty much committed to one brand or the other. Another camera to consider in the same price range and with similar features would be the Sony A7Riii.
OK, now that I have said that, I have to ask, what is your experience level? I can not in good conscience recommend either of these cameras to someone who is just beginning underwater photography. They would be overkill and there are cameras which are much better suited to learning how to do underwater photography.
Given that it appears that you have 50-99 dives, if you want to get into underwater photography, here is my sincere advice. Before you start doing photography, make sure that you are a good diver. Make sure that you have your buoyancy perfected. Assuming that you have mastered that, I would recommend starting off with a simpler (yet very good) system. I think that something like a Sony A6500 in either a FantaSea, Nauticam, or Aquatica housing with a pair of Inon S2000 strobes would be a very good system to learn with. It will give you the capability to shoot RAW, it will be a camera that has a 20mp+ sensor and 5 axis in camera stabilization. The selection of lenses that are compatible with the Sony A6xxx series of cameras has been a draw back in the past, but there are some exceptional lenses out there today for both macro and wide angle.
Another camera that has the capability to give you outstanding images would be the Olympus OM-D E-M1 Mark II. It is a Micro Four Thirds camera and so it has a smaller sensor than either of the two cameras that you asked about, but M4/3 is a very good form factor underwater and it has a huge selection of available lenses including an remarkable 60mm macro and a wonderful 8mm fisheye.
Both the Nikon D850 and the Canon 5DM4 are exceptional cameras, but unless you already have the experience to exploit their capabilities, I think that you could become extremely frustrated trying to master them.