Fwiw, i have the opposite experience of napping. Napping adds to mental fog for me especially for the hour immediately after napping. Its not until several hours later that i actually experience any loss of mental fog or increase in clarity.

It probably depends on how much sleep you're lacking, and how long the nap is.

My experience after sleeplessness nights is that even few seconds help significantly, especially when you're almost unable to function anymore.

If the nap lasts longer than 30 minutes, though, you have a good chance of feeling groggy afterwards.