There is a memorable scene in The Terminator where the machine has taken damage, shuts down, and then boots back up.
Napping works somewhat like that for humans.
In the course of being alive, you're always doing little subtle damage to your brain and body and organs. Sleeping can help alleviate this damage and let your body repair itself.
What's miraculous about napping, though, is just how much can be repaired in such a short time.
I'd eventually like to spend time researching the exact mechanics, but I suspect that a lot of hormones and chemicals that have pooled in various places in the brain are -- for lack of a better word -- "flushed away" when you nap.
I also suspect that thinking generates "memory leaks" similar to a late-middle version of Windows running on crummy hardware. Meaning, the more programs you use, the more there are trace accounts of those programs running in your brain that haven't given back the power they're currently occupying.
So, that's my theory: napping flushes chemicals and fully closes down processes that aren't running any more, but are still consuming the brain's energy.
I don't know if it's true. I do know napping is a huge productivity and quality-of-life booster. I aim to do it daily, and get considerably more work done when I do. You ought to try it, if you don't currently.