Even a little sleep deprivation results in a measurable decline in performance on many tests of mental and physical agility. The military is concerned about such declines and promotes research into ways to prevent it. The military also makes use of medicines to promote sleep and wakefulness.
US Special Forces troops are known to use sleep aids and The Atlantic reported on Ambien use by Navy Seal Team 6 during the raid to get Osama bin Laden.
The main stimulant in military use today is caffeine. Back in 2002 an U.S. Army Research Institute of Environmental Medicine study found caffeine "significantly improved visual vigilance, choice reaction time, repeated acquisition, self-reported fatigue and sleepiness."
The army issues caffeine gum, and flight crews use dextroamphetamine. This use of amphetamines goes back to at least World War II. Often military personnel are not ordered to take stimulants, but their doctors "make them available" if they want them. Even in the 1940s military observers knew the potential dangers of these drugs, which can lead to paranoia.
Called "go pills" the Air Force banned amphetamines in 1992, only to bring them back for the war in Afghanistan in the early 2000s. The early bombing raids were very long flights, often taking off from a base in Missouri, flying to Central Asia, dropping the payload, and returning to Missouri without landing.
Today the military continues to experiment with ways to affect sleep duration, sleep deprivation impact, vigilance, and mental and physical performance. The motivation is both to have highly effective military warfighters, to keep personnel from doing an inferior job, and to make the enemy keep fighting even when exhausted. All four branches of the US military authorize use of dextroamphetamine. The use on any combat mission is largely up to the personnel involved with the mission.
The stimulant modafinil has found its way into civilian life, but much of the early research was sponsored by the military, looking for ways to capture the upside of amphetamines (focus, energy) without the downsides (paranoia.)
A report on US astronauts in the journal Lancet stated that both sedatives-hypnotics and stimulants were commonly used on the space shuttle and space station. Sleeping pills included the z-drugs and benzodiazepines, quetiapine, and melatonin. To wake up, astronauts used coffee, although not as much as they did on the ground in regular life, and modafinil.
The report also noted that sleep deprivation was common in preflight training. The astronauts told interviewers Nocturnal enuresis was their main problem with sleeping. The body’s signal controls that indicate bladder fullness don’t function well in low gravity.