Hi DANSR132,
Thanks for reaching out and posting in Apple Support Communities. We'll be happy to see how we can help with your iMac today.
If we understand correctly, this began after the recent macOS 13.3.1 update. Your iMac is not waking from sleep when tapping the keys/space bar on the keyboard, but does wake up when you press (or tap) on the Power button. And to have your iMac and mouse working, you have to restart the computer.
First, we'd like to have you take a look to make sure none of your settings were changed without your knowledge during the update. The steps below can be found here: If your Mac sleeps or wakes unexpectedly - Apple Support
Check your system’s sleep settings
Make sure the sleep settings are set the way you want.
- On your Mac, choose Apple menu
> System Settings, then click Lock Screen
in the sidebar. (You may need to scroll down.) - To set the amount of time that should pass before your computer goes to sleep, do one of the following:
- Click the “Turn display off on battery when inactive” pop-up menu on the right, then choose an option.
- Click the “Turn display off on power adapter when inactive” pop-up menu on the right, then choose an option.
You can also turn off “Prevent automatic sleeping on power adapter when the display is off” in Displays settings.
If you find that your settings are as they should be, reach back out to us and let us know which model iMac we are working with. You can find that information by going to the Apple menu and selecting About This Mac.
Take care!