A Stanford psychologist explains why spacing out and goofing off is so good for you