As was mentioned above, it happens in every field. Like in music, one day I play with not even thinking of it, and another day I can't concentrate, like the mind is not there, and I make mistakes. Same in sports and all other activities. You trying to solve a problem, but the more you think of it - the more you wearing yourself out, and the solution is even farther away. It's a normal occurrence. Many factors can contribute to this. The best approach is to take a brake and get your mind off things. You'll be surprised how soon you'll find a solution to the problem, or the things you do will be done much easier...
But there are times when you don't have this luxury of taking the time out.
Like you're on a long trip. It's early morning, you haven't sleep well, you feel tired, cranky, and not up to riding at all. But you need to ride on in order to meet the schedule; to be in the next town on time, to catch a ferry to the other side... and so on. Well, just get on a bike, and slowly roll out. Synchronize the ride with the "speed" of your mind. You'll be surprised how in time you'll get up to the task and be "yourself" again.
So yes - practice, taking it slow, and possible rest are the key.