Sleep is not a single state, but a complex set of brain processes that supports several physiological needs. Sleep deprivation is known to affect attention in many animals, suggesting that a key function of sleep is to regulate attention. Conversely, tasks that require more attention drive sleep need and sleep intensity. Attention involves the ability to filter incoming stimuli based on their relative salience, and this is likely to require coordinated synaptic activity across the brain. This capacity may have only become possible with the evolution of related neural mechanisms that support two key sleep functions: stimulus suppression and synaptic plasticity. We argue here that sleep and attention may have coevolved as brain states that regulate each other.