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.
Kamimori, G. H. (2015). Caffeine improves reaction time, vigilance and logical reasoning during extended periods with restricted opportunities for sleep. Retrieved from https://www.ncbi.nlm.nih.gov/pubmed/25527035