I've been looking into this and it appears that in some situations after 5 minutes of inactivity the ESP requests confirmation that it is still connected to a WiFi network (tries to renew its lease). It appears that dependant on the response received from the AP / router the ESP still believes it is connected but the AP / router stops sending data to the ESP. Changing the lease time on the AP / router to anything less than 5 minutes seems to cure this, as it never has more than 5 minutes of inactivity, but is not really the answer. Whilst I haven’t done enough research to understand what the difference is, it appears to be something to do with whether it is a level 2 or 3 something (its late and I'm not getting my notes out) on the AP / router.
Still working on this – if any of this makes sense to you and you get there first please post the answer and you will save me lots of time. Happy to team up to solve this if you know about AP / router stuff.