The next time it happens log into your router and navigate to advanced settings and look for PING then issue the command PING www.google.com -n 20. You should get 20 packets returned with no loss. If there are lost packets then the problem is between your router and ISP.
If no lost packets then on the PC go into command entry and issue the same PING command. If you get lost packets then the problem is between the PC and router.
You can increase the number from 20 but its best to keep these test to a minimum as the Google server may object to you bombarding it with pings.