Military statutes dictate that when there is evidence of a foreign actor or actors interfering in our election process they can act to restore the legitimate civilian govt. In fact it is their duty to do it.
Sure there is...
Conceivably, in a wartime situation, overseas.
Those statutes, whatever they may be, certainly do not contemplate allegations of a stolen election as justification for a military coup against the US Constitution.
"Stolen elections" are not new in US history, there have been several over the years and one which comes to mind is JFK's dad in 1960 paying off Chicago Mayor Daily to steal that election for Kennedy over Nixon.
Nixon did not get mad about it, but he did, eventually, get even.
That's what I expect to happen again.