"O LORD, you have searched me and you know me.
You discern my going out and my lying down; you are familiar with all my ways. (v.1-3)You know when I sit and when I rise; you perceive my thoughts from afar.
...Where can I go from your Spirit? Where can I flee from your presence?" (v.7)
I am sure that God knew exactly where Adam was, but He was giving Adam the chance to reveal himself. To his credit, Adam answered. He explained that he had heard God in the garden and had hidden himself because he was naked.