Yes, I agree, but if you have work to do and a deadline you can't afford resting until you deliver right?
Probably every programmer have experienced the case of "Banged head against issue entire day, after sleeping and waking up the problem was simple". Sometimes, a nap or a walk or doing something else can trigger that same thing, but you skip the whole "banged head against issue entire day" if you do it immediately :)