Naps produce sharply different results for different people and on different days. Two variables account for most of the variation, and both are controllable.
Length determines what you wake out of
Sleep proceeds through stages, and a nap long enough to reach the deeper stages will usually be interrupted partway through when an alarm sounds.
Waking out of deep sleep produces sleep inertia: grogginess, disorientation and impaired performance that can last a considerable while after rising.
A short nap ends before the deeper stages are well established, which is why brief naps often feel restorative while longer ones feel worse than no nap.
Timing interacts with the body clock
Alertness dips in the early afternoon in most people, independently of lunch, and a nap placed in that window aligns with a trough rather than fighting a peak.
Falling asleep is easier there, and the same nap attempted in the late morning or early evening behaves quite differently.
Evening naps sit close enough to the night to interfere with it, which is the main route by which napping damages a sleep schedule.
Napping spends the pressure that builds bedtime
Pressure toward sleep accumulates across waking hours and is discharged by sleeping, which is the mechanism behind feeling sleepy at a consistent hour.
A long daytime sleep discharges a substantial portion of that accumulated pressure, leaving less available at night.
This is why naps are among the first things clinicians ask about when someone reports trouble falling asleep, and why insomnia programs commonly restrict them.
Caffeine timing overlaps with the nap
Caffeine takes a while to reach full effect, so the practice of drinking it immediately before a short nap has a coherent basis.
The effects arrive around the time a brief nap ends, which is when sleep inertia would otherwise be at its worst.
It works less well for people sensitive to caffeine or napping late enough that the stimulant is still active at bedtime.
Who naps well and who does not
Habitual nappers generally fall asleep faster and wake more easily, since the schedule is regular and the body anticipates it.
Occasional nappers under sleep debt tend to fall into deeper sleep quickly, which is exactly the situation that produces the worst waking.
Sudden new daytime sleepiness in someone who did not previously nap is worth mentioning to a doctor, since it can accompany conditions that are treatable.