Lock yourself out of your phone for a certain amount of time
Hand it to a roommate?  Or trade phones with a study partner?  

Reminds me of the old "how do I stop myself from using my credit cards" scenario:

http://moneyning.com/credit-cards/freeze-your-credit-cards-to-ice-your-spending/