An average sleep cycle lasts 90 minutes and moves through several stages. The first 20–30 mins. of sleep are relatively light, and are non-REM. Then the cycle dives into “slow wave sleep”, which is also non-REM. This is when the brain produces the slower delta waves characteristic of deep sleep; it lasts about another 30 mins. Slow-wave sleep is followed by another period of lighter non-REM sleep, and finally the REM period, when dreaming occurs (REM sleep is actually fairly easy to wake from).
So, what you want to avoid is having to wake from the slow-wave portion of the cycle (which is not the same as REM). This is accomplished by either limiting the nap to 20 mins. or allowing the cycle to run through the full 90 minutes (or even a bit less, if you don’t mind interrupting your dreams).