My husband is the one who has AS, and there are a few things. If his flare up is due to a severe shift in weather, it's a bit of a "wait and see."
Other than that, he tries to make sure it's not stress-related, and if it is, address the stress somehow. My insurance covers parts of massages, so that's been a big help for him when stressed is involved.
I know there's a fine balance between just enough movement and too much, but if he stays in bed, it'll usually get worse. Small walks are the best bet for him.