Simple explanation: sleep inertia.
To simplify this incredibly: your brain has two main sleep states -- 'light' sleep, and deep sleep. Waking up from light sleep is incredibly easy, and it takes mere seconds before you're functional again. Waking up from deep sleep takes much longer -- quite a lot of your brain has to re-initialise before it's fully functional again.
And if you wake up during deep (or slow-wave) sleep, you feel absolutely awful for the half hour or so it takes for your brain to wake up properly and resume functioning. That's sleep inertia.
Anyway, about these 'cycles' that exist -- basically, during sleep, your body alternates in and out of deep sleep. During the first 4 or so hours, they're not very regular at all -- the first cycle can last up to 4 hours in some cases, although they average out to 1.5 hours each towards the end of a 7-8 hour night.
It's not about 'breaking' the cycle, strictly speaking (technically, any sort of waking up breaks the cycle), but where you break the cycle. If you're woken in the middle of a cycle (when you're in deep sleep), then you'll feel like a pile of sh!t.
How long it takes you to transition between light and deep sleep depends on a lot of things including how tired you are and how you respond to sleep. So it'll vary (and there's no hard-and-fast rule) but between 20-30 minutes seems to be the ballpark figure.
Get an alarm clock and experiment. That's all there is to it.
If you have a smartphone with an accelerometer, you can get apps which use the accelerometer to measure your body movement to determine which phase of sleep you're in -- while I've found them to be effective for usage for a full night (upwards of 6 hours, so the app can actually get some data), they tend to be less effective for short naps.
So, alarm clock.