The most effective way that I've found is to push your boner to the side, if that makes sense. The problem with this is that you gotta hide the act of pushing your boner to the side.
What's a better way? Don't you dare say folding your arms...
-
I just put my hands in my pockets and push outwards. If I'm sitting down and it's pointing down my leg, I tuck it under my thigh a little bit. It is uncomfortable but it gets the job done.