Happened to a friend of mine! He was the captain of a Los Angles Class Sub and while he was asleep whomever was in command at the time ran into a Japanese ship due to the venturi effect (basically the sub got sucked into the ship as the ship passed over it) and my friend was relieved of command and shortly thereafter left the Navy. Keep in mind before he was a captain of the vessel he was the chief tactician for an admiral at the pentagon. He had a great reputation and knew the right people but in the end it just didn't matter. The commander is where the buck stops.