From my experience, motivation is like a sugar-rush. You feel great the first few moments, but that quickly dies down. You feel bummed out and drained, and most importantly, you don't have the urge to do anything.
Building a work habit is more important in my opinion. You see people like George R.R. Martin and Stephen King writing tons of good books, and it's not just because they have motivation... you can get motivation for anything, even in something you don't necessary like. What is important is that you have habits. You build a habit of just writing things out, even if it's terrible. They sit down, write 1k, 2k, 3k a day, the word count starts adding up. Even in my workshop, I begun building that habit of just grinding out everyday, and "The Coming Storm" is probably the largest output I've ever done.
You build habits all the time, whether you know it or not. You build a habit of laziness when you start putting things off one-by-one. You build a habit of boredom when you refuse to do anything you're not interested in. The only thing you have to do is to keep up with your schedule. Set your mind to a goal. If you stick with it, starting with one day, then the next, then the next, you'll see it becomes natural to you overtime.
As the #1 New York Bestseller Brandon Sanderson once said... Writing is not about Inspiration, Good Ideas, or Luck... Writing is about Practice.
