Chosen Solution

two things happened around the same time. the table the iMac fell over but physically the imac looked ok. The other was an update went through that caused a restart. I think its more of a software issue because if I run the wifi diagnostics it turns the wifi back on, if i restart the computer the wifi is on. If i walk away from the mac and come back after a while (not sure the time frame) but the wifi will be turned off. I cannot turn it back on unless i do one of the things mentioned above.

Sadly your logic board got damaged from the shock. I’m suspecting one of the larger components shifted enough cause it to fail when your system goes into sleep mode. You could try downloading one of the anti-sleep add-ons from the App Store that may be enough for now otherwise its time to visit either a good Mac repair person who has the needed skills to fix your logic board or an Apple Store which would likely just replace the logic board.