Once your phone goes to sleep (not turned off) your phone wifi also goes to sleep.
So any data that is used in that mode does not come over your wifi. The wifi is not activated again until your manually wake up the phone, at which time the wifi will also come back to life.
If the phone is using wifi to transmit/receive data when the phone goes into sleep mode that will continue until the data flow stops, then the phone wifi will go into sleep mode.