I'm having this problem as well.
Keep Wi-Fi on during sleep: ALWAYS
Avoid Poor Connections: OFF
Wi-Fi Optimization: OFF
When the phone goes "idle", meaning the screen goes off for an undetermined amount of time, and I turn the phone back on, the Wifi and signal bars are gray meaning no internet connection. Then it takes a good 15-30 seconds to lease an IP address (my assumption), and then the 2 indicators go blue which restores my network connections, and my alerts, messages, emails come in.
And to top it all off, I've noticed my battery usage to be even worse than before. I lose 15-20% overnight.
This is all after 4.2.1 or somewhere around then.