Those who aren't familiar with jazz often have the misconception that improvisational jazz is music without rules. Musicians just do what they want without regard to the usual structure that you find in other forms of music. The reality is that this incredible music is made by very disciplined musicians who have spent years honing their craft and that it is built on the same musical structures you find in others genres.
Though jazz musicians often improvise, their "stylings" are always done within the "orthodox" laws of music - the rules of harmony, melody, rhythm, etc. Even though they may not have studied it formally, these musicians know musical theory. They know what notes fit together in the key being played. They know rules of meter and tempo. It is their knowledge of the "truths" of music that allows them to play together in harmony and beauty rather than in disharmony and in tones that distract rather than enthrall. The music really isn't a free-for-all. It is the result of "scholars" who know the structure of their medium by heart.
On top of that, they have developed their skills as musicians by hours and hours of practice before they ever hit the stage. Any professional musician would tell you of the hours they spent in secret - practicing technique, scales, etc. They have given themselves to the discipline of learning their craft. And it is those hours of secret discipline that frees them to improvise when the spotlight is on.
One other regarding the discipline of jazz: The knowledge gained through experience and the abilities honed through discipline have to be used in humble cooperation with the others in the ensemble. If the musicians are not willing to "submit" to one another, there would be chaos as musicians played over one another and forced their way to the forefront. The knowledge and skill has to be tempered with unity and humility to produce the result that all desire.
The spiritual applications, I hope, are fairly obvious. If we desire to live a jazz-styled spiritual life - one that is free to improvise and follow the direction of the Holy Spirit - these characteristics have to be true of us. There are Christians who say they are following God but are not willing to learn the truths of Scripture that provide the "structure" for life and the Church. The truths of the Christian faith aren't just open for everyone to interpret for themselves. The Bible teaches us what is true and what is right and how to live. Our lives need to be lived in submission to those truths. If we don't, we will find ourselves in a climate of division and distrust. In other words, the religious climate that the Church finds itself in today.
How do we learn these structures that allow for cooperation and unity? Through the disciplines that hone our knowledge and skills - such things as the study of and meditation on the Word of God, time with God in secret prayer, the guidance of spiritual mentors, etc. These spiritual disciplines develop in us the knowledge and skills that allow us to discern the voice of the Spirit and give us the ability to go where he is leading with confidence.
Over all of these things, we have to put on the love and humility that allows us to hear what God is saying to us through others and to work with them to produce the desired results - the honoring of God and the furthering of his Kingdom.