How to fix DNS resolving issues on Mountain Lion after waking from sleep?
I've had this exact same experience, though not every time. Sometimes it means sites that I have visited recently are unavailable but other sites I haven't visited in ages load just fine. 

Usually flushing the DNS cache resolves it.

sudo killall -HUP mDNSResponder