The wisdom behind the old saying "let sleeping dogs lie" is based on the fact that canine instinct is at work while a dog sleeps protecting him from dangers and predators. Any sudden arousal from sleep sets off a hyper defense reaction that is completely instinctual. Your guy probably felt bad the minute he woke up fully, but it is a reaction he cant help. It is sort of like someone sneaking up behind you and shouting "boo". You will startle and perhaps scream and then feel annoyed and foolish afterward, but you could not have helped it.