I think your best bet is to wire a double pole relay (with 24V coil) so that one contact is wired to "self-latch" the relay so long as it's powered up, but will drop out once power is lost (and stay off when power is restored). Then wire a UM506 in _momentary mode_ across this contact to actuate the relay.
Funny you should happen to post that while I was working on my crude drawing.
Ok here's one one my crude drawing showing how you could do it with a 24V double pole relay.
o
o-----------o
! \ o--------------------o
!
2 ! o
4 o-----------------o
V \ o---------+---o * ---> To AC
-----mmmm------!
! 24V relay
!
o-----+--------------------------------o
*Reset point - You can connect a universal module here in momentary mode to reset relay.
Relay is powered through one of its own contacts and stays on only while power is on. When power fails, a reset is required to latch the relay again.
BTW...Does you generator power all your outlets. i.e. Are any not on the generator? If so they could be be used to automate a reset when power returned. Does X10 run when outlets are powered by the generator?