Improvement to cognitive performance caused by exercise could last for 24 hours, a new study shows. Scientists also linked getting 6 or more hours of sleep to better memory test scores the next day.