Sleep is under control of two processes, circadian and homeostatic regulation, but little is known about how these two processes integrate. Here, we identify a Drosophila gene, ninna nanna, encoding two alternatively spliced isoforms: Ninna and Nanna. Both proteins encode aldo-keto reductases and are expressed in different, yet interconnected neurons. One isoform, ninna, encodes an aldo-keto reductase with predicted affinity for NADP(H) and is expressed in key circadian pacemaker neurons, the s-LNvs. The second isoform, nanna, encodes an aldo-keto reductase with predicted affinity for NAD(H) and is expressed in ICLI neurons, a pair of wake-promoting peptidergic neurons whose inhibition relieves sleep pressure. Ninna and nanna neurons interconnect to integrate a binary sleep sensing circuit in which ninna receives circadian information and nanna encodes homeostatic sleep pressure. ninna nanna defines an archetypal circuit for the integration of circadian and homeostatic sleep drive and reinforces the hypothesized link between aldo-keto reductases and sleep regulation.