If you use a Apple TrackPad or Keyboard, you might experience that you are not able to rename the devices.
One way is to do it from the original computer pairing the devices, but you might not have that on hand.
Another way of fixing this is to make a Factory Reset of the devices, which you can access as a “hidden” feature.
Click and hold SHIFT + OPTION and click the BlueTooth icon, and then you should see some additional options in the menu such as the “Factory Reset”.
Execute the reset command, and the device will reset and disconnect. Afterwards you simply connect from scratch, and you should be able to rename the devices again.