Same problem on my M1 Mac mini on 12.3 using a MX Master 2S mouse.
It seems to happen after the display has been off after a screensaver (for me display off after 1Hr, screensaver after 5min).
I have to Quick Search "Bluetooth", and once the Bluetooth system preference window appears, the mouse works.
Weird but it works like that every time, and it happened to me quite a few times the last few days.
My AirPod Pro though seem ok sound wise and at keeping a connection to the M1, but they have not been able to connect automatically to the M1, but just my phone. On the Mac I explicitly have to select them in the Sound output list. And thinking of it, I had to also go to the Bluetooth window to verify it was visible in the list of devices. And then they worked. I'll try to reproduce and confirm that :)
Weird but very bad bug bringing the user experience score down to close to zero when using macOS...
Edit: I tried to reproduce the Airpod Pro scenario, the airpods would not this time even connect automatically with just the bluetooth window opening, I had to specifically click Connect. Less weird but still a bug, though less disruptive because I don't use Siri at all. :D