It probably started as military slang. Certainly the first time it appeared in print - to mean a baby in the womb - was in Nicholas Monsarrat's 'The Cruel Sea', published in 1951. It's a pretty apt phrase...the makings of a baby have been put into in a warm place, where they will eventually come to fruition in a different form, exactly as unpalatable dough is put into an oven to emerge later as something tasty.