In organ improvisation and composition ostinato technique can become very handy. Since there are 3 main elements of music: melody, rhythm, and harmony, any or all of them can become the basis for ostinato.
When keeping the same melody, you can change the meter, the rhythm, and the chords. When keeping the same rhythm, your melody and chords can be different. When keep the same chords, you can change your melody and rhythm. And don't forget to use different textures and modes to make it really colorful and spicy.
Of course as in everything when improvising, you should be conscious of time. It is best to keep track of time by counting measures and the repetitions of the fragments.
I find that an episode of about 1-2 minutes based on two or three similar but somewhat different ostinato figures used interchangibly can be very interesting to hear. You can even construct fairly lengthy and advanced pieces by alternating the contrasting ostinato episodes, resulting in rondo forms, such as in A B A B A or A B C B A or A B A C A B C A etc.
Try the ostinato technique in your organ composition and/or improvisation today. It's fun and easy and interestingly, leaves a powerful impact on the listeners.
By the way, do you want to learn my special powerful techniques which help me to master any piece of organ music up to 10 times faster? If so, download my video Organ Practice Guide.