It might work, but almost every manufacturer warns against it.
From Netgear:
Can I plug my powerline adapter into a power strip, surge protector,
Uninterruptible Power upplies (UPS) or extension cord?
No. NETGEAR does not recommend using power strips, surge protectors,
UPS and extension cords with Powerline products. These devices filter
out some or all of the high frequency signals used in Powerline
communications. Connecting a Powerline to one of these devices can
greatly reduce the data rate of transfers, or block communications
entirely.
From Tp-Link:
Q: Can Powerline adapters work if they are separated by UPS?
A: No. Usually, UPS has filter function. It can cut the powerline
connection. Some air-switches or breaker also have the same function.
Besides, some power outlets have surge protector function which can
also cut the powerline connection. You’d better not plug powerline
adapters to outlets.
I should add that I'm using them with power-strips, and that's also not recommended, but it works and I don't have other option for now. So, I would say you should try and find out. It won't (or shouldn't) damage the devices (keep in mind though, that I'm not taking responsibility if it does!).