There's a difference between using stimulants on long missions to stay awake (especially if, for example, you're flying an aeroplane) and getting cranked on speed before a battle purely because you're rather fight high than sober.
The German army in WW2 famously experimented with the latter during the invasion of France, but they seem to have reigned it in after that, mainly because while it might be initially effective, soldiers aren't much good for anything when they're having an awful comedown after a meth binge.
Modafinil is a good choice for the former because it's extremely effective at keeping you awake, but has almost no classical dopaminergic stimulant effects and isn't really fun to use