Every year the Navy has at least one mind blowing story regarding leadership failure. Remember that Captain of the submarine USS PITTSBURGH who had an affair with a girl in Virginia, and he was telling her he was a Navy Seal.
Navy Times article with more details.
Looks like he got sick with the flu, then had something called "facial paralysis." Stayed in his cabin and pretty much turned command over to Savage - who was CHENG and only Acting XO (how does the USN let an Aegis cruiser go at least half a deployment without a permanent, rated, XO).
The relationship may not have been sexual in nature. I'd guess you had an ambitious O6 fearful of losing his command (and his career), and an ambitious O4 who saw a great leadership opportunity ... and the two worked out what they thought was a win-win. The Command Master Chief had to have approved of it, failing to report the matter.