I don't recommend it. Most UPSs use SLA (sealed lead acid) batteries and their charging circuits are designed to charge SLAs. There are big differences between charging NiCads and SLAs. If you were to just use NiCads in place of the SLA, the UPS will cook the NiCads very quickly. You would have to modify the charging circuit to correctly charge the NiCads.