This study investigated whether four single nucleotide polymorphisms (SNPs) moderated caffeine effects on vigilance and performance in a double-blind and crossover total sleep deprivation (TSD) protocol in 37 subjects. In caffeine (2 × 2.5 mg/kg/24 h) or placebo-controlled condition, subjects performed a psychomotor vigilance test (PVT) and reported sleepiness every six hours (Karolinska sleepiness scale (KSS)) during TSD. EEG was also analyzed during the 09:15 PVT. Carriers of the TNF-α SNP A allele appear to be more sensitive than homozygote G/G genotype to an attenuating effect of caffeine on PVT lapses during sleep deprivation only because they seem more degraded, but they do not perform better as a result. The A allele carriers of COMT were also more degraded and sensitive to caffeine than G/G genotype after 20 h of sleep deprivation, but not after 26 and 32 h. Regarding PVT reaction time, ADORA2A influences the TSD effect but not caffeine, and PER3 modulates only the caffeine effect. Higher EEG theta activity related to sleep deprivation was observed in mutated TNF-α, PER3, and COMT carriers, in the placebo condition particularly. In conclusion, there are genetic influences on neurobehavioral impairments related to TSD that appear to be attenuated by caffeine administration. (NCT03859882).