I am not a medico or health professional but without hesitation I can say exercising works like cleansing. When you exercise, you sweat, in order body toxins washed out and create room for fresh new energy.
Exercise makes you thirsty and hungry, your body absorbs nutrition well, you drink more water and you sleep much better.
When your body is healthy, your brain will be healthy. And healthy brain question more?
To achieve good grades you need to ask more questions? Those questions shall come from brain, and when you ask a question, you seek answer of it and then ask bigger questions.
Physical exercise is not a magic bullet, but from experiences I know when I am physically active I perform better than the lazy days.
Create those healthy neurons, exercise daily, hit the Gym.