The mistake that people make when "unmotivated" is to "take breaks." Of course, you need breaks from time to time, but doing nothing while hoping to later to be able to do something is a recipe for disaster. The best ways to stay motivated, at the end of a PhD program, or otherwise, has XXX keys:
- Establish a system for accomplishing tasks.
- Set your work calendar and stick to it.
- Have a plan for when you are unmotivated, and use it.
- Ward off distractions.
Establish a System
There are many programs for accomplishing tasks, and most involve creating a task list and checking off those tasks. Popular ones that I like included the Pomodoro Technique and the Getting Things Done methodology. Regardless which method you choose, follow it. This not only helps you complete your tasks on time, it also prevents you missing your graduation because of a failure to file the 1000 forms that all universities seem to require in your final year.
Stick to a Work Calendar
This is easier if you are teaching, but make sure that you have work days and 'off' days (usually weekends). It is important to work on the work days, but it is just as important to take off days off. If you don't all of your days blur together, and it becomes even harder to get 'up' for the work days. On every work day, you must do some work.
Have a plan for unmotivation
Everyone has days that they just aren't ready to go, so plan for that. For me, I go through old articles and re-read them, update my notes on things relevant to my research, or refine my programing. That usually gets me out of a funk, and I sometimes get good ideas from it. You should always have a 'backstop' for these tasks, too, so they don't become your primary objective, which leads to...
Ward off distractions
Everyone fights distractions, but the two that are killers at this point are: new project ideas and ankle biters. It seems like everyone who is working on a Dissertation suddenly has 1 billion ideas at the end for what to do next. The temptation is to stop working on the dissertation and start on a new project, because it is all shiny and new. Instead, write it down in a notebook of file you keep for that purpose and accept that you will come back to it when you have more time. If you always keep such a notebook, you will never run out of research ideas.
Ankle-biters can take over any life, mostly because they are necessary. Most important is that you you prioritize your work first. Be aware of the deadlines, and don't do any of them until you are done with your actual work, or until they are due. Your research is your job; filling our paperwork isn't. If you treat it that way, you will better be able to stay motivated.