I think sometimes - and this worked for me, I'm not sure if it will work for you or anyone else - is to forget motivation. Not completely ditch motivation, but enough so you will stop telling yourself: 'oh ok here's homework and a bunch of shit I should do but hey, I ain't motivated enough sooo I'm just going to binge-watch Breaking Bad'. Because we become too reliant on motivation and then that reliance makes us weaker when we aren't motivated, which is actually a lot, especially for students. I reckon sometimes its just about actually just doing it, even if its completely mind-numbing painful shit, and just doing the work without overthinking. Motivation is fleeting, but discipline is stronger.