I read from a book one thing that changed this cycle for me.
You expect to get motivation first, then start working. This thing not always work like that, it's self-enhancing cycle. Work -> Motivation -> Work -> Motivation...
The thing is you can start this cycle from any point. I.e. if you want to get motivation for work just start doing a little.