It sounds like you need to get in the zone and power through it. The problem is the best way to get in the zone is through repetition and linking of habits. I had an odd habit of drinking grapefruit juice whenever I code (mostly because water is too boring and soda makes my teeth icky.) Because of this habit, I can now feel compelled to code merely by putting my headphones on and drinking grapefruit juice. Pick a time. Clean up. Turn off the phone. Turn off the internet. Get yourself a bottle of water and juice and whatever you want to drink/snack on. Put in headphones. Get comfortable. Sit down. And do it. Prepare yourself for the task and just go full force. You don't get to adjust the temperature. You don't get to get up and pee. You get to do the task at hand until it's fucking done. And then you will pee and run around and dance and rub your knees and ass and feel fucking great. Pick a reward after that. Sometimes I let myself get drunk as fuck whenever I'm done and ignore anything else on my to do list for the rest of the day. By the way, this is very different advice than the "what do you do to create stuff." That is all based around inspiration and being creative. You've already done the hard part. This is the easy part where there is nothing but brute force to get you through it.