Use The Major Scale to play along to CMaj9. Try using your imagination to discover what lines you can play over it. To train your ear, make a sincere effort to internalise the sound.
If you’re having trouble coming up with new ideas, my books are filled with several variations on how to play intervals, scales, melodies, and more.