How can the Bible say God was refreshed if he never gets weary? These two passages seem contradictory: the first says that God rested and was refreshed on the seventh day, but the second says God is never tired or weary. How can these passages be reconciled?

It will be a sign between me and the Israelites forever, for in six days the LORD made the heavens and the earth, and on the seventh day he rested and was refreshed. (Exodus 31:17, NIV)
Do you not know? Have you not heard? The LORD is the everlasting God, the Creator of the ends of the earth. He will not grow tired or weary, and his understanding no one can fathom. (Isaiah 40:28, NIV)
The simplest explanation is that God did not literally rest, but simply that he "rested from creating."  From a Christian perspective, God did not rest, in the sense that he stopped doing anything, on the seventh day. In fact, he was then very active in his relationship with Adam and Eve, and all the rest of humanity.