In the sound of his master's snoring, a puppy lay in bed half-squinting and unable to sleep.