usually I don't hear a single melodic line...I hear the melody played by french horns etc. with orchestra accompaniment (fast woodwind scales+string rhytm: triplet motifs+choir: long sustained notes.- just an exameple)....so i hear the thing fully orchestrated usually its like complex ideas..
(Of course dont hear whole pieces, just the actual part i want to figure out so its nothing special -.-" )
BUT first you need to now what you want to achieve with your piece:
-Mood (happy/sad, epic thingy, romantic, suspense....-> major/minor or other egsotic scales )
-Tempo
-Instrumentation
.....
.....
.....
Once you now these...and you have a melody...its kinda easy to choose instruments to play it (especially when you have a certain plan about the whole piece (sections, bridges,modulations, tempo changes.....and so on))
For example if you have a part where you want some epicness, also a bit dark ambient, with a bit of suspense....you'll maybe use some heavy brass playing the main motif.....you wont use flutes, oboes, steeldrums (lol), harps etc. to express ultimate power (-.-")
Also if you have a romantic scene or something like that calm scrafty stuff maybe you play that sweet melody with octave strings etc, or some more expressive isntruments like flutes......you wont use Tubas etc. to express some romance lol
So its very easy to attach melodies to different instruments when you know EXACTLY what you want to achieve...