Yup, happens to me all the time. We're very task-focused people who tend to get lost in the details and routine of daily tasks. It's easy to lose sight of the forest for the trees, so to speak. After getting over the challenges of a new project (say, a new job) and understanding what needs to get done, and then doing it, I quickly get bored. Work is pretty exciting at first and then gets routine.
A good way to get motivation back is to get sight of the forest again. Why are you doing this project in the first place? When I was stuck on a project, I'd go talk to a professor who would ground me again by reminding me of the goals and his vision for the project, its larger implications and possibilities for the future.
Basically, take a break from whatever you're doing, go do something else, and then come back to it. Be more P-ish. Js are good at finishing projects, while Ps are good at starting them. It's easier to lose motivation if you focus too much on the tasks.
How about motivation in life, and not just work? I guess I'd maintain it with constant reflection, self-understanding, and good relationships with other people.