Shortage of sustained nighttime sleep can be supplemented with naps during other times. If other sleep can’t be obtained, stimulants such as caffeine (see the Operation Supplement Safety [OPSS] caffeine chewing gum research summary) can be used to improve alertness and performance until sleep can be obtained. These substances are not substitutes for sleep, just tools to use until adequate sleep can be acquired.
If you’re an aviator, you might have the option to take prescription medicines such as dextroamphetamine or modafinil. For more information, read the OPSS article on these substances and the different branch policies on their use.