Two things work for me:
1) Cut superstimulus, which probably includes much of the internet, video games if you play them, etc. Unfortunately it doesn't seem to work to just manage these things, because the issue isn't the time you spend on them, but the pleasure they produce. For me at least, this includes LW.
2) Talk about your work, both with people who understand the field, and those that don't. Explaining your work in terms laypeople can understand often involves explaining why it's interesting or important, and it's good to go over these reasons.
Cut superstimulus
What exactly does that leave?
I have a master's project I'm having trouble working on. It's something I've wanted to do, and I even started working on, long before I started my master's degree. If I can't even enjoy that, then I'm doomed to spend eight hours a day doing something I hate for the rest of my life. Even if I manage to improve my willpower, I doubt I'll be very productive doing something I don't want to do.
Does anyone have any idea how I can enjoy working more?