Nitrites are what ammonia is conerted to via nitrobacter, Im puzzled that nobody knows where nitrites come from....
If you have a nitrite spike it is reasonable to believe you also had an ammonia spike that you did not see on your test kit. You may have had a large snail or something else die and it wasnt immediately visible. If its a semi-mature aquarium then your other bacteria will convert your nitrite to nitrate, so no worries there.
As for the mag, i would monitor it for deflation and/or gaping mouth. If the anemone continues to look subpar i would consider looking for ciprofloxacin , septra , or doxycycline to begin treatment. Most of these can be purchased online or at a reputable LFS.
Good Luck!
Sent from my SM-N900P using Tapatalk