how did sleep evolve