hi! i had the same problem that started just today and im glad i can sleep sound.. my wifi grayed out too.. i did these steps and it worked..
>go to settings and turn your airplane mode on as well as your do not disturb mode..
>turn your phone off.. wait for 3-5 minutes.. then turn it back on..
>then turn your do not disturb mode and airplane mode off..
>after doing these steps, i hope your phone's wifi is already working just like mine.. goodluck! i hope it helps!