NASA worked out the perfect nap. It is 26 minutes long
Pilots who took a short planned nap were 34% better at their work and 54% more alert afterwards.

In the 1990s, NASA and the US aviation authority wanted to know whether a short nap could make long-haul pilots safer. On real transpacific flights, some pilots were given a 40-minute window to rest in their seat while the other pilot flew. On average they fell asleep for about 26 minutes.
Compared with pilots who got no nap, the nappers were 34% better on performance tests and 54% more physiologically alert later in the flight. The late-flight lapses of attention seen in the no-nap group were far fewer in the nap group.
The length matters. A short nap keeps you mostly in light sleep. Nap much longer than half an hour and you are likely to slip into deep sleep, and waking from deep sleep leaves you groggy and heavy-headed for a while, which is the feeling most people blame on "napping". A late or long afternoon nap can also make it harder to fall asleep at night.

