I can’t even count the number of times that I’ve had to give up on a problem after banging away at it for an afternoon only to solve it in 20 mins the next morning. Almost never fails.
However, banging away at a problem for an afternoon is often needed for the solution to magically pop into our head next morning. The break helps, but so does the work itself.