I have had a Mac M1 Mini for two weeks. Until today, I had no bluetooth issues.
I have a Magic Keyboard (about two months old) and an older (battery) Magic Trackpad. Today, the Keyboard started typing on its own. I couldn't log in after sleep. The Trackpad worked fine. I rebooted and it worked again.
So the next time it went to sleep, it came out and wasn't working. I have a second Magic Keyboard as I type in two languages and the mapping is a pain with accents. So I got that one out and it wouldn't work right either. Then I had the Magic idea that the Keyboard might work better without the Magic so I plugged it into the Lightning cable. And just like (not) Magic, it works. And the other one works too.
So I log in and disconnect the Lightning and the Magic disappears when I try to type. Both Keyboards stutter and both decide to repeat, especially on the space bar. However, the Trackpad still has Magic powers and it works fine. I try each Keyboard in the unMagic mode, i.e., with the Lighning cable, and both work fine.
So I reboot and now the Magic is back, but I assume it will go away at some point. I am going to disable Sleep and see if that helps, but that seems like a really stupid solution. Why have Sleep if you can't Magically Wake Up?
Through all of this, I removed my four external drives, as some people have suggested that they interfere with the Magic. This had no effect on anything.
So I will find out if not sleeping restores the Magic but at this point, I'm not happy.