If for some reason you want to restart your Mac and your mouse is not currently working, you might need to rely entirely on your keyboard before you explore the option of a hard restart.
There are key combinations and shortcuts on your Mac keyboard that do more that you thought they could.
To quickly restart your Mac using the keyboard only, press Control + Command + Eject/Power buttons.
That’s a total of four buttons you need to press simultaneously. Some keyboards have the ‘Power’ symbol while others have the ‘Eject’. symbol on the button at the top right corner of the keyboard. Either will work just fine.
This will restart your Mac immediately. Hopefully this will have solved whatever issues you had with your mouse.
PS: How To Charge your Mac’s Magic mouse
Watch: How To Restart Macbook Air