it's not clear to me (sorry if i've missed some info somewhere) whether this is paid work or not.
if it's a personal project, then one option is to take a break. i've been writing software for way too long (20 years?) and in that time have nearly always programmed in my free time, but there was a period of about a year when i felt burn out and spent my free time building electronics and learning bass guitar.
another option - one that is possible if it's a personal project and may also be possible (perhaps with some negotiation) if it's paid - is so switch focus. sometimes, for example, writing documentation can give you a new view on a project that gets you back working. i am currently working on a parser (called lepl) and whenever i work on documentation i end up with a whole pile of new ideas.
related to that - dog fooding. can you use the software you are developing in some way? that can motivate you to add a feature that would really help you out. similarly, getting a release out. particularly if it's open source (or a free beta?) - feedback from other people is motivating and helps highlight the most important features (which might not be what you were expecting).
at the same time - trust yourself. my guess is that you've not been programming that long. these things always come in cycles. once you've been through a few it's much easier to just take it easy, knowing that the drive will come back. i'm lucky in that i work from home - there are days when i do almost nothing but eat, sleep and surf the web (and there are many more days when i work my ass off - the idea is that there's give and take, it's a two sided deal....)
finally, look after yourself. look at what you're eating, how well you're sleeping, whether you're getting enough exercise. perhaps take a personal day and do something interesting.