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.