When someone declares martial law, that means that they intend to use the military to enforce their rule. At that point the military has been
told to take a domestic political role - it wasn't the military's choice.
Of course, the military could refuse. In the abstract, I think that might be ideal. (I don't know enough to say whether that would be ideal in this situation.)