Caffeine is widely used to promote wakefulness and counteract fatigue induced by restriction of sleep, but also to counteract the effects of caffeine abstinence. Adenosine is a physiological molecule, which in the central nervous system acts predominantly as an inhibitory neuromodulator. Adenosine is also a sleep-promoting molecule. Caffeine binds to adenosine receptors, and the antagonism of the adenosinergic system is believed to be the mechanism through which caffeine counteracts sleep in humans as well as in other species. The sensitivity for caffeine varies markedly among individuals. Recently, genetic variations in genes related to adenosine metabolism have provided at least a partial explanation for this variability. The main effects of caffeine on sleep are decreased sleep latency, shortened total sleep time, decrease in power in the delta range, and sleep fragmentation. Caffeine may also decrease the accumulation of sleep propensity during waking, thus inducing long-term harmful effects on sleep quality.