In my experience, anywhere from one week to several months.
When I got injections in my neck, it was remarkable. I actually had a curve in my neck for the first time in years. But the knots re-formed after about a week. In fairness, my neck spasms are very stubborn. When I go for a massage, I ask that my neck not even be touched, because it'll hurt so much, and even if the knots get worked out, they'll return within 48 hours.
In my lower back, they went better. I tend to get these walnut-sided muscle knots to each side of my spine, right around the natural waistline. If a trigger point injection succeeRAB in smoothing that out, it'll probably be 4-6 months before things build back up to where they were before.
I think of it like a professional dental cleaning, actually. I stretch and exercise on my own, get massages, but sometimes it's not quite enough, and the knots start to build up again.