You can shake your shoulders and stretch your upper body when you are tired, but the time should not exceed 5 seconds.
Then keep the original posture and continue to learn.
Don't be too tired, or you won't learn.
Take a deep breath and stay calm.
Put your feet flat or cross your legs. The key is comfort, but you can't be too slack.