Yes and no. Lieutenant Maryk relieved Captain Queeg in the moment of the Caine's near peril because he thought that it was the only way to save the ship. He had been convinced by Keefer and by his personal study of psychological texts that the captain was not right in the head. Maryk's analysis and prior experience led him to believe that the captain would stubbornly hold to the impossible fleet course, even if he knew that it was wrong, until the Caine floundered and sunk. Maryk did not commit the act out of any personal dislike of the captain, as is shown by his good treatment of Queeg after the relief. Maryk acted solely with the safety of the crew of the Caine in mind, which justified him under Article 184 of Naval Regulations.
The final word about the event does not lay with Maryk, however. It comes out later that of the forty-plus ships that had been stranded in the typhoon, only three had sunk. Though none of them may have been in the state of mechanical disarray that the Caine was, most of the rest of the fleet had managed to survive the storm without deviating from the directed course. Furthermore, Barney Greenwald's accusations against the crew present another side to the incident that calls Maryk's actions into question. Viewed in some lights, the mutiny was an attack against all that is sacred about the Navy. The inexperienced wartime recruits took down Queeg, a man who had been fighting for the United States for years. The civilian sailors unleashed their frustrations on their captain. In removing him, they violated the Navy's trust in command. Willie Keith eventually realizes that he supported Maryk because of his personal antipathy for Queeg. Because we see events from Willie's perspective, we initially see Maryk's actions in a heroic light, and then begin to see them as wrong.
Maryk was a simpleminded, sturdy sailor who had been corrupted by the novelist Keefer into thinking that Queeg was crazy. While each of the questionable incidents in his log could be explained separately, Keefer took them together and interpreted them as a clinical case of paranoia. He misapplied a Naval regulation in order to override a Naval order. Though the novel often makes the Navy seem ridiculous, stubborn, and simpleminded, it also maintains that the Navy is good, so it is hard to excuse Maryk's attack on the Navy.