Well, I just tried it on my 4S running iOS 6. The IP address of my phone is 192.168.1.5. I pressed the SLEEP button after the first response to the ping command. The pings are 1 second apart. So on my phone at least WiFi was turned off after 30 seconds. If I leave it plugged in WiFi stays on forever. I've done this same test with earlier versions of iOS with the same results.
mba_wired:~ lfinch$ ping 192.168.1.5
PING 192.168.1.5 (192.168.1.5): 56 data bytes
64 bytes from 192.168.1.5: icmp_seq=0 ttl=64 time=132.904 ms
64 bytes from 192.168.1.5: icmp_seq=1 ttl=64 time=55.240 ms
64 bytes from 192.168.1.5: icmp_seq=2 ttl=64 time=78.309 ms
64 bytes from 192.168.1.5: icmp_seq=3 ttl=64 time=3.261 ms
64 bytes from 192.168.1.5: icmp_seq=4 ttl=64 time=1.422 ms
64 bytes from 192.168.1.5: icmp_seq=5 ttl=64 time=47.233 ms
64 bytes from 192.168.1.5: icmp_seq=6 ttl=64 time=70.150 ms
64 bytes from 192.168.1.5: icmp_seq=7 ttl=64 time=104.757 ms
64 bytes from 192.168.1.5: icmp_seq=8 ttl=64 time=117.650 ms
64 bytes from 192.168.1.5: icmp_seq=9 ttl=64 time=140.955 ms
64 bytes from 192.168.1.5: icmp_seq=10 ttl=64 time=61.357 ms
64 bytes from 192.168.1.5: icmp_seq=11 ttl=64 time=1.702 ms
64 bytes from 192.168.1.5: icmp_seq=12 ttl=64 time=108.255 ms
64 bytes from 192.168.1.5: icmp_seq=13 ttl=64 time=132.025 ms
64 bytes from 192.168.1.5: icmp_seq=14 ttl=64 time=26.686 ms
64 bytes from 192.168.1.5: icmp_seq=15 ttl=64 time=76.522 ms
64 bytes from 192.168.1.5: icmp_seq=16 ttl=64 time=99.362 ms
64 bytes from 192.168.1.5: icmp_seq=17 ttl=64 time=122.417 ms
64 bytes from 192.168.1.5: icmp_seq=18 ttl=64 time=42.988 ms
64 bytes from 192.168.1.5: icmp_seq=19 ttl=64 time=66.043 ms
64 bytes from 192.168.1.5: icmp_seq=20 ttl=64 time=89.214 ms
64 bytes from 192.168.1.5: icmp_seq=21 ttl=64 time=215.004 ms
64 bytes from 192.168.1.5: icmp_seq=22 ttl=64 time=135.481 ms
64 bytes from 192.168.1.5: icmp_seq=23 ttl=64 time=56.364 ms
64 bytes from 192.168.1.5: icmp_seq=24 ttl=64 time=83.966 ms
64 bytes from 192.168.1.5: icmp_seq=25 ttl=64 time=105.677 ms
64 bytes from 192.168.1.5: icmp_seq=26 ttl=64 time=8.151 ms
64 bytes from 192.168.1.5: icmp_seq=27 ttl=64 time=46.121 ms
Request timeout for icmp_seq 28
Request timeout for icmp_seq 29
Request timeout for icmp_seq 30
Request timeout for icmp_seq 31
Request timeout for icmp_seq 32
Request timeout for icmp_seq 33
Request timeout for icmp_seq 34
Request timeout for icmp_seq 35
Request timeout for icmp_seq 36
Request timeout for icmp_seq 37
Request timeout for icmp_seq 38
Request timeout for icmp_seq 39
Request timeout for icmp_seq 40
Request timeout for icmp_seq 41
Request timeout for icmp_seq 42
Request timeout for icmp_seq 43
Request timeout for icmp_seq 44
Request timeout for icmp_seq 45
Request timeout for icmp_seq 46
Request timeout for icmp_seq 47