DNS stands for Domain Name Service. DNS is a service that resolves names into Internet Protocol (IP) addresses. When you enter http://www.msn.com in your web browser, DNS resolves that name into an IP address. Your browser then attempts to open a connection to that IP address.
For example:
C:\Documents and Settings\Administrator>nslookup www.msn.com
DNS request timed out.
timeout was 2 seconds.
*** Can't find server name for address 192.168.1.1: Timed out
*** Default servers are not available
Server: UnKnown
Address: 192.168.1.1
Non-authoritative answer:
Name: www.msn.com.nsatc.net
Address: 65.54.152.126
Aliases: www.msn.com
For most folks with home routers, the router automatically obtains an IP address and the list of DNS server IP addresses from your Internet Service Provider (ISP) using dynamic host configuration protocol (DHCP). Your computer obtains an IP address automatically from the router, as your router also functions as a DHCP server for computers on your home network. The router gives its inside IP address as a DNS server (192.168.1.1 in my example above). This means you do not need to manually enter the IP addresses of your ISP's DNS servers in your computer's TCP/IP configuration, which can occasionally change. It also means all your DNS queries are actually handled by your router.
If you are using a home router and are familiar with its configuration and maintenance (it may have a web browser for configuration), check the currrent status of the home router the next time you encounter this DNS failure. On a Netgear WGR614, for example, you can check the currently issued IP address and DNS servers after logging in at http://192.168.1.1. It has a Test button under the basic setting tab that attempts to open a web page from Netgear's internet site to test connectivity.
You can also try manually entering the DNS server IP addresses from your ISP in your computers's TCP/IP configuration and see if the problem continues.
In addition to what Ti_Cool_Tech described, you may have a problem with the DHCP lease issued by the ISP to your router. If your router allows the lease to expire without renewing it, you'll encounter problems.
I do not have experience with dynamic connection protocols like PPPoE or PPPoA, but those connections may go dead after several hours of no use, and require some activity to re-establish the connection to the ISP. This may explain why your initial wake-up always encounters a DNS problem.