It's simply a matter of practice (haha!).
Think about it, if I gave you a Bastien or Faber book of beginner pieces for children, you would most likely be able to look at some of the pieces for a little while, and then play them perfectly from memory, yes? When starting your piano studies, you learn these easy pieces first, then progress to more difficult ones. So the same goes with learning "away from the keyboard."
First you need to look at why you can learn these simple pieces without actually practicing them:
1) They're short, and your short term memory is capable of storing these bits of information for a short period of time, but if you continue to look at them, they are committed to long term memory.
2) Because they are beginner pieces, and you are far advanced beyond them, you have already acquired the technique to play them easily, so your body doesn't need to learn anything new.
3) The chord progressions and figurations are simple, and readily apparent.
The list can go on, but these are the basic tenets.
Theoretically, as your technique, understanding of harmony, and memory improve, you should be able to learn more difficult pieces in this manner. Theoretically...
Most of us will never achieve the level of Gieseking, Richter, Gould, Argerich, etc etc, especially in this regard, however that doesn't mean we can't try to improve our mental capacity to learn, or at least practice, away from the keyboard. Yes it's difficult and boring, but in some instances it can be very helpful if you've practiced this skill.
If you're just learning the piece, you must look at the score and the figurations, and decide on fingerings, and then imagine exactly what technique/movement must be used in order to achieve the desired result. Not just the movement, and the sound, but also the feeling of the keys, the posture you would be in, etc etc. It is all encompassing, and is extremely slow going, and also mentally very fatiguing as it requires a great amount of focus.
If you've already learned the piece, then you've already decided on fingerings, phrasings, etc etc. Now instead of deciding on those things, you move directly to the second half of the exercise, and think about every possible facet of playing the music, and exactly how you want it to sound.
As an added benefit, all of this helps a great amount for those of you who have memory problems.
Of course, this is merely speculation and I have no proof to back any of this up. I can only say that I feel that doing this has helped me a lot when learning pieces or when I couldn't get to a piano.
On a sidenote, and this is my little plug as a Biology minor (formerly Major), there are studies that have shown that seeing or thinking of an action is almost the same as actually doing it. To elaborate:
When you make a movement, for example, playing a C Major arpeggio, very specific motor neurons fire to make this movement.
When you see or think this movement, a different set of neurons called mirror neurons fire, mimicking the same pathways as the motor neurons. An experiment regarding physical actions and their correlation with neuro pathways was conducted some time ago on monkeys that led to these conclusions, hence "monkey see, monkey do."
Is this a suitable substitute for actual physical practice? No. But as a supplement to structured practice, it certainly can't hurt.