UPS (battery back up) is primarily for computers and such, not for audio. That being said, it would probably make sense for the NAS.
Higher end models will feature 'True Sine Wave' tech, but even then, I am not sure it help with high end audio equipment.Perhaps an EE will chime in.
A surge protector might help, but I would consider installing a whole house surge protector at the breaker box (that is, you own your home).
Though the power here on Long Island is pretty stable, I have had a few occasions when they disrupted power unexpectedly due to line work.
Thankfully, it has never adversely affected my equipment other than having to reset/repower affected units.
Bob