When I'm tired, I don't have the mental capacity to go above and beyond, so I just concentrate on producing something, anything. Turns out it's much easier to modify something that is sort of crappy but exists than create something great out of thin air.
The take away is that if you can, just produce the crappiest, quickest thing you can first. Once you're done, seriously evaluate if it actually needs to be any better, because often this crappy solution isn't actually that crappy and perfectly sufficient (I'm looking at you, Unix). If you think it can be better or needs to be better, don't be afraid to throw the whole thing away and try and make a slightly less crappy version. Even if you redid the same thing 5 times and the result is only slightly better each time, it's often less effort than if you tried to create the final solution from scratch on the first try.
I don't know where this quote comes from, but I really like it and I think embodies this kind of philosophy and thinking: you don't understand a problem until you've solved it.