I have the same problem randomly. It will work for X amount of minutes, then the wifi will just hang. Phone shows its connected, but no Internet access.
I've tried every single suggestion and still can't fix this. I know it's not a defective device because my home network is the only one that gives me this issue. I know it's not a router issue because every other device connects fine. It's a Sony bug that needs to be fixed. My gs3, OnePlus one, Galaxy nexus, Asus transformer prime, and 5 laptops don't ever have this issue. It truly is pathetic for a flagship phone to have this issue.