Does this happen with any other devices connected to your wifi in your house? Has this happened with other phones? Can you confirm that other devices still have wifi connectivity when your phone loses connection? Do you experience this problem when connected to other wifi networks, or just your home network?
Try restarting your phone when this happens. If you're still experience the same problem after restarting your phone, try restarting (not resetting) your router.
Also, what's your router model? Are you running stock firmware on it or third-party like Tomato or DD-WRT?