Showing up to a physical space for a particular activity has many advantages. When you show up to an office building, you’re ready for work. The environment isn’t connected to sleep or laziness. You don’t associate the space with anything but work. By walking in, you prime yourself for the activity that is about to come. That happens unconsciously, yet you do it on purpose because you recognize the positive effects.
You should use this effect to your advantage. If you study well in the library, take the extra trip to show up at the library rather than stay at home. You’ll be more focused, and the extra couple of minutes will pay off.