Military ballots have no special rules (They can't unless you added some requirement to prove you are actually in the military), so they fall under the states laws for absentee ballots (Either overseas or otherwise)
The federal law that covers it is the Uniformed and Overseas Citizens Absentee Voting Act, and it just has very general guidelines that says you have to count them. All ballots must be postmarked by election day (Which is earlier in most of the globe of course), and what time it has to arrive varies by state. For instance, South Carolina requires all absentee ballots, including overseas ones, to be received with 48 hours of the polls closing (So 7 pm tonight). Since this is the shortest one in the entire nation, that is what military election assistance officers plan around.
Realistically though, especially for deployed soldiers, you need to mail your ballot in early October if you want it to count. Especially from remote sites, your ballot may not get postmarked for a week or more after you handed it off.
All the legal and practical stuff is irrelevant though, because there just aren't enough of them. If every active duty service member lived in Wisconsin, and they all voted for Trump, there still wouldn't be enough absentee ballots to flip it for him if they voted at the normal rates.