Sleeping causes the following penalty: Flat-footed and a -4 conditional penalty to perception and AC. Being flat-footed gives you a -2 circumstance penalty to AC.
This means that a level 20 character has at least have an AC of 26 while sleeping
This character will only be hit by 5% of the commoners who stab at him while he sleeps. Peasants should truly fear the strongest of adventurers.
Think about it like this, higher level characters are used to sleeping in dangerous areas. As such, they have gotten used to sleeping “with one eye open” while getting all of the benefits of a full nights reat. Additionally, their combat expertise allows them to unconsciously maneuver their body, to a certain extent.
Yeah I’m seeing this as a feature, not a bug.