When I'm stuck or seem to lack motivation, I often force myself to start putting words on paper.
I just grab a notebook — not a digital device, gotta eliminate escapes and distractions — and start writing. Even if it it begins with "I don't know what the hell to write," at least I'm writing.
Eventually it goes somewhere.