It will work of course.
I did a similar thing, but it so a device with volt free contacts which weren't mains rated to control a mains load. I used a transformer, bridge rectifier and filter capacitor, to power the relay, rather than a switched mode power supply. I don't remember whether I used the usual back-EMF diode, or switched the AC and allowed the bridge rectifier to act as the freewheeling diode.