I did not say the military would be arresting, or even holding the usurper, I said they would be *protecting* him. I speculated that the *civilian* authorities might choose to hold the trial on a military base for security reasons. Military facilities are generally more isolated, and military bases are already "limited access* facilities. Even if someone did manage to get onto the base, the detention and trial facilities are often not directly adjacent, nor are the nearly as "cheek by jowl" with other facilities as might be the case for a federal courthouse.
The proceedings would be civilian controlled, with the military providing support and assistance.
Federal law, in fact, severely restricts the use of military in law enforcement.
Not nearly as strictly as most people think. There all sorts of exceptions. Back during the Clinton years, several of the members of my old reserve Intelligence detachment were "seconded" to the FBI, DEA and other federal law enforcement agencies. One then major in particular told me that as long as they didn't directly participate in an arrest, it was legal, and he is a lawyer.
Providing the sort of services I'm postulating would be well within the law, 18 USC 1385, which states:
Whoever, except in cases and under circumstances expressly authorized by the Constitution or Act of Congress, willfully uses any part of the Army or the Air Force as a posse comitatus or otherwise to execute the laws shall be fined under this title or imprisoned not more than two years, or both.
But you might take a look at 10 USC 333 which states in part:
The President may employ the armed forces, including the National Guard in Federal service, to ... suppress, in a State, any insurrection, domestic violence, unlawful combination, or conspiracy if such insurrection, violation, combination, or conspiracy results in a condition described in paragraph (2).
One of the "conditions" allowing such use is:
That would fit the situation to a "T". There are other possibly applicable exceptions to the Posse Comitatus Act above.
Oops,
one that
opposes or obstructs the execution of the laws of the United States or impedes the course of justice under those laws.