Some improvisors say they stick to four-bar and eight-bar phrases, picking out chord tones as end points along the way. Others only get "serious" (start thinking about where they're headed melodically) on beats three or four of a single measure, knowing the chord tone they want to land on (the resolution to whatever tension they've created) in beat one of the next measure; still, others don’t think of chord tones or targets at all but improvise freely, fingers flying like a Rolodex over the applicable modes on any given chord progression. These strategies are simply a means to an end; what works beautifully in the hands of an expert could, in the hands of a novice, be a complete mess.
I never had given much thought to improvising in modes other than Dorian, Mixolydian, and Ionian for the ubiquitous ii-V-I pattern, maybe Locrian for the ii of a minor ii-V-i. I always had assumed it would be way too difficult and time-consuming to memorize all those "other modes," and how would I use them, how would I know when to play them, and in what context? Until I remembered something, a simple truth I'd learned a long time ago, the value of which I either ignored or glossed over in my hunger to consume all things Jazz: modes are scale degrees; "thinking in modes" means thinking in scale degrees. This may sound simple, obvious, and redundant, but for the aspiring improviser I think it can open many doors.
For example, let's say I'm improvising over an E-flat major seventh chord. I not only have many scale choices; I have many ways of thinking about my scale choices. I could improvise in E-flat Pentatonic, or in E-flat Lydian, thinking "okay, Lydian: raise the fourth note of an E-flat major scale a half-step," or I could think, "okay, Lydian: the fourth scale degree of B-flat major; improvise over the E-flat chord as if I were playing in B-flat major." Which is of course what I am doing anyway.
Granted, when starting out this way as a pianist, I'm going to want to look down the keyboard to mentally recalibrate, so that I'm "seeing" E-flat as the fourth note of the B-flat major scale, and that's going to take some time, but if the goal is to learn these modes so well you don’t have to hesitate for an instant, then I believe, especially for classically trained pianists, the "thinking in modes/thinking in scale degrees" method of improvising is a viable option for the practice room, especially when you're working in the so-called "difficult" keys of D-flat, F-sharp, B, and E, or when you're playing not in the major modes but in say, the modes of the harmonic or melodic minor scales.
The idea here is that your fingers, after playing in and out of these various modes (thought of in the practice room as simple scale degrees: root, second, third, fourth for Ionian, Dorian, Phrygian, Lydian, etc.), that this mode/scale thinking will expose your ears to more and more "flavors" for you to use over any given 1) chord, 2) chord progression, 3) formula [i.e., the B section of an AABA tune] or 4) song form… Each "dish" gets bigger and more complex until finally you don’t worry about reaching for some cliché lick or prelearned pattern; you've broadened your palette (to abuse the food analogy one last time); you're choosing the exact notes your inner ear wants your fingers to execute. And at this point (hopefully) you're no longer thinking in modes; you’re not thinking at all. You're improvising!