Caffeine is one of the most widely consumed stimulants in the world and has been proposed to promote wakefulness by antagonizing function of the adenosine A2A receptor. Here, we show that chronic administration of caffeine reduces and fragments sleep in Drosophila and also lengthens circadian period. To identify the mechanisms underlying these effects of caffeine, we first generated mutants of the only known adenosine receptor in flies (dAdoR), which by sequence is most similar to the mammalian A2A receptor. Mutants lacking dAdoR have normal amounts of baseline sleep, as well as normal homeostatic responses to sleep deprivation. Surprisingly, these mutants respond normally to caffeine. On the other hand, the effects of caffeine on sleep and circadian rhythms are mimicked by a potent phosphodiesterase inhibitor, IBMX (3-isobutyl-1-methylxanthine). Using in vivo fluorescence resonance energy transfer imaging, we find that caffeine induces widespread increase in cAMP levels throughout the brain. Finally, the effects of caffeine on sleep are blocked in flies that have reduced neuronal PKA activity. We suggest that chronic administration of caffeine promotes wakefulness in Drosophila, at least in part, by inhibiting cAMP phosphodiesterase activity.