There could be a few different causes for this. I would reccomend that follow some of the troubleshooting steps in the following article under the section "Symptom: The network connection drops unexpectedly"
If you keep having issue, you may want to contact Apple Support.
I have been having this problem with just one of our iMacs in our house. I went through Apple support and navigated through all the twists and turns they suggestedto try to get the problem solved. NOTHING WORKED. THEY DON"T KNOW HOW TO FIX THIS PROBLEM. BUT I DO! Unfortunately it involves buying a $30 wireless ethernet adapter (I got an IOGEAR, and I have no connection to their company. Probably any wireless ethernet adapter will work). I turned off the internal airport wireless device and through the network settings in the system preferences connected to my CISCO LYNKSYS ROUTER (which has been bashed left and right in the forums here). THE PROBLEM IS SOLVED!!!!! NO RESTARTING!!! NO DROPPED CONNECTIONS!!!!
So the problem isn't with the router, its with the airport wireless adapter in the iMac. It stinks to have to spend more money after you lay out so much for an apple product, but it sure beats restarting the computer over and over every day.
Hope this helps my friends out there. I can now allow my hair to repopulate my head since I've been pulling it out over this issue for months.