Waking up before the alarm

Let’s say I want to maximize the amount of sleep I get, yet still wake up refreshed.

AssUme I wake up before the alarm goes off, I look over at the clock and see I have X minutes left before the alarm sounds.

It seems if X is less than 15 minutes or so and I do go back to sleep, when the alarm sounds I wake up very tired, more so than if I had just gotten up in the first place.

However if X is 40 minutes or so, I seem to wake up ready to go.

I remember reading once (no cite, from a dim memory) that if you take a nap, it should be more than 45 minutes but less than an 1 1/2 hours, due to the phases of sleep or something (hey, I said it was from dim memory).

For what values of X should I just go back to sleep? For what values of X should I roll on out of bed? Assume I can fall back asleep fairly quickly (1-3 minutes).

At this site
Circadian Learning Center - Optimizing the 24/7 Workforce
I found the following article:
Napping 101

which says the following about naps (read the article for more complete information)
[ul]
[li]Best times are 13:00 - 17:00 during the day; difficult to nap between 19:00 - 21:00.[/li][li]They should be either 20 - 30 minutes in length or else multiples of 90 minutes to minimize grogginess and disorientation when waking up.[/li][li]This is because it takes approx. 30 - 40 minutes to enter REM stages 3 and 4 (the deeper stages), and 90 minutes is the duration of a full sleep cycle.[/li][li]After a nap give yourself 10 - 15 minutes before doing anything that requires full alertness.[/li][/ul]