Explanation of Surprise Attacks
The important part, that is not immediately intuitive, is the result of monster vision being checked at the beginning of their turn.
Thus, from animations only, it might seem that if the enemy is “hot on your heels” and there is no gap between you, then passing a door wouldn’t help you (since the enemy *seems* to move at the same time as you and the door never visually closes). However, in reality the monster moves *after* you, so the whole process looks like this (starting with you standing in the door, and enemy next to you):
You move from the door -> door closes -> enemy turn starts, it doesn’t see you, it tries to move to your last know position (onto the door) -> the enemy moves onto the door, opening it -> since you just “came into view” for the monster, you can now surprise attack it.
This works for one hit, and then you can for example walk towards the next door and repeat, without needing a gap between you and the enemy. (assuming the enemy isn’t faster than you).
Same applies to what the Distrattos said with the pillars/grass. When walking around one, it *seems* as if the monster is moving at the same time and you aren’t breaking LoS, but you actually are, allowing you potentially a surprise attack every second turn (walk -> hit -> walk -> hit -> etc.) when walking around a pillar or single patch of grass.
As far as the sleeping part, my understanding is that if a monster is sleeping then it is a surprise attack, and also it is a surprise attack in the first turn when they wake up (so with ranged weapons you should be able to do two most of the time). As far as sneaking up to a sleeping monster for melee attack, this is mostly luck (though levitating is stealthier I think, plus there is a ring for stealth) but the rogue has a talent that makes it easier.
But I would treat sleeping surprise attacks as a bonus (unless you have a highly upgraded stealth ring or are a rogue specializing in that) and focus on using doors and corners/grass, as this is where you can get them easily and reliably.