An EEG signal of sleep is associated with better performance on a mental task.