I'm sorry that isn't working for you. Maybe try a hot shower followed by stretching?
I'm on a muscle relaxer but it doesn't seem to work
It sounds like you are describing muscle spasms. If that sounds right to you, yes, I have that with my AS. My rheumatologist prescribed a muscle relaxer for that. I'm sorry you are dealing with it and I hope you find some answers.