just pop it up into your waistband and wait for your boner to go down, or really try and focus on your teacher. If you're already jacking off in the morning, then there isn't much else you can do. Boners are a part of life so it's better to learn how to live with them than trying get rid of them