It is. After 18 hours without sleep you could as well be drunk, as it comes to discretional capabilities and clarity of thought.
One of the things a GOOD programmer learns is when to call it a day before putting more bugs in the code than he actually solves.