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.