In my apartment complex where I had this issue, it would have have required re-wiring, AND the apartment complex wasn't at all interested in making sure the fire alarm didn't go off if I was making toast...
One little crumb burns and all of the fire alarms in the apartment would go off, not pleasant at all.
At the easiest level, the "rewiring" is the least of the problems. When you move it, you now have to make a new hole in the ceiling to mount the unit and pass the wires through AND you have now left an old hole in the ceiling that will need to be patched, textured (to match) and painted (to match). However, depending on the direction your ceiling joists run compared to the direction the wires run in the ceiling AND the direction you need to move the unit, you might have to create a new hole in the ceiling big enough to get a drill in there to drill a hole through the ceiling joist to pass the wire into a new area of the ceiling. That is more to patch, texture and paint. While not something very difficult for a skilled tradesman [tradeswoman, tradesperson(?)], it is not something the average person is going to do satisfactorily themselves and would likely want to hire a skilled person to do it. Moving a wired smoke alarm isn't really much easier than moving a wired ceiling light.
One little crumb burns and all of the fire alarms in the apartment would go off, not pleasant at all.