Like everything, "structured thinking" takes time to develop, and there are some simple exercises you can do to get you on your way.
Thinking, in terms of music composition, greatly incorporates a variety of learned skills, two of which are applicable to this question: awareness and organization.
Before you play, organize or plan what you're going to play. It can be as simple as just talking it out with a friend. "Ok, we're going to do 3 bars of 3/4 and then 2 bars of 4/4." Or it can be an extremely in-depth planning process. Creating a guide will help direct your playing / writing and create more consistency in your approach.
Awareness plays a critical role in composition / performance. If you switch time signatures, you want to be aware that you're doing so, and understand why you're doing it. In this particular instance, I would recommend a couple things for you to improve:
- active listening
- play in those time signatures
Listening actively and transcribing what you play as your are playing it will help you stay more aware of what it is your doing or what's going on. This sounds difficult, but will improve over time.
Transcription (total transcriptions) are vital for developing the ear and an awareness of what is going on in an ensemble. Apart from transcribing your own stuff, transcribe others' music as well.
Lastly, physically playing in each time signature will help you become more familiar with each and how to count through them. Next, pick two to move between and practice doing it consciously. Then add another, then add another, and so on. By practicing moving between them you will develop your sensitivity to meter changes and therefore increase your overall awareness.
This is not a comprehensive answer, but it does provide a few ideas on how you may get started.