Exercise before learning helps you pump up your short-term memory, exercise after seems to help long-term recall.

www.sciencedaily.com

Exercise (30 minutes of cycling) before learning benefited immediate recall. But when people had to wait to recall the words, they performed best when they exercised after learning.