Scientists have developed a completely automated technique for real-time detection of sleep/wake states in freely moving mice.