I think that this is a good question. From how I interpret this, what I think you are asking is, "Is it okay that I periodically have to step away from the computer"?
I do not think that there is a day that goes by where I don't have to get up and ask somebody else what they think, or pull out a piece of scratch paper and scribble down an equation to work out the problem. Also, when you get more into programming, you will not might not even start writing the code until you have created a diagram/architecture beforehand.
I was taking a data structures course when I was in college, and was having trouble designing a sorting algorithm. When I asked my professor for some help, he knew that I hadn't thought about the problem beforehand. The first thing he told me was that I was not ready to begin writing the code yet. So he pulled out a piece of paper and drew a couple of squares, and then he put in the numbers from the array. Next he drew a couple more pictures where he move the squares around and showed me visually how the sorting algorithm would work.
Some things you can do to clear your mind and solve the problem:
- Take a break
- Talk to a colleague
- Whiteboard the problem/concept
- Sleep on it!
Don't be surprised if you wake up in the middle of the night with the solution.