If you start exercising, your brain recognizes this as a moment of stress. As your heart pressure increases, the brain thinks you are either fighting the enemy or fleeing from it. To protect yourself and your brain from stress, you release a protein called BDNF (Brain-Derived Neurotrophic Factor). This BDNF has a protective and also reparative element to your memory neurons and acts as a reset switch. That’s why we often feel so at ease and things are clear after exercising and eventually happy.