An interesting theory I've read is that it comes from a strict lenten discipline of the Syrian churches. How well supported is this idea?
Ramadan was certainly one of the "Treasured Months", in which fighting was forbidden in Pre-Islamic Arab customs, but fasting was definitely a historic practice. In fact, Allah mentions it in the Qu'ran too. "2:183 O ye who believe! Fasting is prescribed to you as it was prescribed to those before you, that ye may (learn) self-restraint,-"