I literally just either borrow short tones I hear from time to time and make something out of that.
OR
I just input random notes into LSDJ at varying points, tweak 'em a bit, and BAM!!! a melody.
My methods aren't really that good tho
This pretty much sums up what I do too.