well what if you don't really hear anything in your head? Maybe I'm just not creative enough but I can say like 98% of everything I've ever written came from messing around on my instrument.
I hear you. Everything I wrote comes from either (a) messing around on my instrument, (b) hearing another song and thinking to myself, that sounds neat, what's going on there, then i start playing around, (c) humming.
I certainly don't hear melodies and then write chords to go with melodies either. I have a feel, a tempo, a guitar in my hand, a piano beside me, and a feeling inside (sad, happy, afraid of the future, angry at the world) that wants out.
I am new at BiAB but BIAB is actually a possible way to get melodic ideas. Having a full BIAB arrangement is the opposite of giving my brain space, but if I start with a full band BIAB track set and then mute everything but the drums, after a listen or two of the full arrangement, then a whole lot of corruptions of what BIAB played will now happen if I just start bashing on my guitar or my keyboard. How about the fact that the Ramones wanted to sound like the bay city rollers, and they failed up, so hard, that they created awesome music that's nothing like the bay city rollers?
You are where it starts. Your limitations. Your tastes. Your faults. Etc. Creativity is just a choice. You sit down and you do it. If you spend 100% of your time trying to write a new melody doing that with BIAB then stop. Get a ukelele. Unplug from your computer. Go stare at the sky and play three chords on a uke. Now sing and hum. Boom. A guaranteed way to get more melodic ideas is to use a mode you didn't use recently. Dorian. Mixolydian. Harmonic minor with a modulation to a major, if you didn't do that last week.
W