Value your free time just as much as your intended work time. If you set a schedule and intend to be finished at 5pm or so, actually stop then. I find it helpful to be more productive if I know that I have a hard stop at some point. Also, take breaks where you do something completely unrelated. If you're studying at the computer, go for a walk, or go sit in another room or whatever. It can help separate the work vs. free/break time more.
Other than that, you might just have to dive in real strong and force yourself to wake up early and grind from the get go. It might suck in the beginning, but it'll quickly get easier once you've established some kind of routine.
Congrats and good luck with your studies!