A new study found that a short 20-minute workout or a 90-minute nap could help the brain recover after a sleepless night.