Well, since this thread popped up, I'll relate a recent occurance.
Last Saturday was the first band practice in over a year. Trad jazz. New band. Never met these people before in person.
For a year I've practiced playing from lead sheets and doing improv. Occasionally use backing tracks. But mostly just improvising on the songs. I start in a different key and practice that too.
I wondered how it would all sound when playing with others. The answer? Wow, pretty darn well. The pandemic has given me the time to work on improv in the safety of my own home.
Now I say, "Give me the solo, man!"
Any theory involved in what I did? No. But also I've spent a year listening to a lot of music in this style. So that gets internalized and comes out.
Would it happen if I listened to another style. Yes. Works that way too. Listen, internalize, play and away we go.