Get a 3/4" thick piece (any smaller and back-box screws will poke through) of your choice of wood (MDF, plywood, etc.) in the size you want and mount your alarms to that. It is reasonably safe enough to mount it to the wall and attach a plug to it, since it is easily removed and doesn’t harm the wall that much.