I agree with BigPoppa.
IF the dog was asleep, it would've behaved instinctively when startled awake...the guilt the dog appeared to show seems to indicate that the dog was aware that it had hurt his owner/master and felt appropriately sorry.
I can give two relevant examples:
Case A: Two of my dogs, a mutt and doberman, got into a minor fight. The mutt was pissed at the doberman and was coming on strong (and if you've seen and heard two dogs fighting, it's a heck of a noise!), the doberman was not fighting back. I reached in to grab the mutt and she bit down hard on my hand - puncture wounds with moderate bleeding/scrapes.
Point # 1 - I had both dogs for nearly 10 years at that time. When the mutt realized she had bitten me, she immediately ceased hostility and began licking my hand/wounds. I have no doubt she expressed regret/sorrow for hurting me.
Point # 2 - She had never done anything similar either before the incident or after.
Point # 3 - I do NOT believe she did it on purpose (obviously) but it happened.
Point # 4 - Normally, I would NEVER interfere with two strange dogs fighting...but these were mine and I didn't mind getting bitten to prevent them from harm (and a huge vet bill.)
His dog, being startled at being jarred out of sleep, probably "attacked" him unknowing who he was...
Case B: While in AIT (in the army), I had come back from Christmas leave (around 1 a.m.) and was sound asleep. The drill instructor came around checking bunks to get a head count, leaned over my bunk, tapped my arm...and I clocked him hard right in the face (no damage, just a red mark). Oddly enough, my roommate (I had three) had also just come in and was getting ready to go to sleep and witnessed the entire thing. I never woke up... and the drill instructor stood up, walked out, and never said a word. When I awoke the next morning, he told me what happened, "OMFG, you totally hit Drill Sgt X last night!"
Point # 1 - People (and obviously animals) can do weird stuff in their sleep and have no memory of the event.