Eric Partridge, A Dictionary of Slang and Unconventional English, Fifth Edition (1961) offers this entry for sprog:
sprog, n. A recruit: R.A.F.: since ca. 1930; by ca. 1939, also—via the Fleet Air Arm—used occ[asionally] by the Navy. H. & P. Origin obscure and debatable (see esp[ecially] Partridge, 1945); but perhaps a reversal of 'frog spawn' (very, very green) or, more prob[ably], the adoption of a recruit's sprog, a confusion of 'sprocket' and 'cog', a sprocket being, like the recruit, a cog in a wheel. In the Navy the term means an infant, 'Nobby Clark's gone on leave, his wife's just had a sprog': Granville, 1945. —2. Hence, an Aircraftman: Australian airmen's: since ca. 1939. (B. 1943.)
The reference to "Partridge, 1945" is a short citation of Eric Partridge, A Dictionary of R.A.F. Slang (January 1945). And "Granville, 1945" refers to Wilfred Granville, A Dictionary of Naval Slang (typescript, 1945). I haven't seen either of these sources.
One early attempt to explain the etymology of the term appears in Walter Hatfield, College English, volume 7 (1946) [combined snippets]:
The Army speaks of a recruit as a rooky, but the R.A.F. calls him a sprog, which, like erk, presents an etymological puzzle. One explanation is that, about the year 1930, a recruit, confusing a sprocket with a cog, achieved the unintentional blend sprog—a mistake that immediately achieved popularity and very rapidly spread throughout the R.A.F. I, however, prefer that ingenious etymology which derives it from frog spawn," the unpronounceable rogsp being back-slanged to sprog.
I am skeptical of both explanations but don't have a better one to offer.
Early matches for 'sprog' in the wild
The British Newspaper Archive lists what appears to be an instance of sprog in the slang sense of "bullet" in "... I'll Shoot," the Lancashire [England] Evening Post (April 20, 1933) [combined snippets]:
MEANING OF "SPROGS"
Dobson, he alleged, also added that he would have to put a few sprogs into some of them. Mr. Justice Goddard asked what the word "sprog" meant, and Wells replied that he understood that it a bullet. "I asked Dobson what [he] meant," said Wells, "and he replied, 'Just wait and see, you won’t shift so easily.' ..."
I don't have a subscription to this service, so I can't independently confirm that the word rendered as sprog or sprogs in the search result snippets is in fact spelled that way in the original newspaper article.
The next three instances of sprog at this site are from 1941 and involve its use in RAF slang, with a very different sense from the one intended in 1933. From "Motley Notes: Bolt from the Blue," in the [London] Sketch (May 28, 1941) [combined snippets], which appears to be an extended exercise in flyboy slang:
What would you make of the following if suddenly called on to translate it[:] "Old Stinker has just had a shaky do and nearly went for a Burton. He pranged a Daffy Kerdumpf and the Groupie tore a strip off him. Next day he had a sprog drone with him in a Wimpie, and the silly binder got a choke in his spout and the flit commode took umbrage. ..."
From an article in the Berwick [Northumberland] Advertiser (June 19, 1941) [combined snippets]:
R.A.F. phrases crept into his letters: he went stooging around, called himself a "sprog," admitting quite candidly that when he got to ops to see his name down for "fun and games" gave all sorts funny feelings inside.
And from "Canadian Pilot Writes Home," in the [London] Sketch (July 30, 1941) [combined snippets]:
Sorta cute, eh? The language, I mean. But that was merely the prologue, just an introduction to this Air Force jargon. I chin-wag with this fellow for quite a while. Presently he asks me if I am a sprog (a new pilot), and when I answer in the affirmative he informs me that I should go into a little room opposite, where I can obtain some hot gen.
"Gen," according to another newspaper article is short for "genuine [that is, reliable] information."
The term sprog in the sense of "new recruit" also appears in Anne Matheson, "A Real-Life Hero and His Seven Heroines: New War Film Concerns England's Women's Army," in The Australian Women's Weekly (October 17, 1942):
"Oh, it's very simple," retorted John — and then lapsed into R.A.F. slang that made our conversation a very one-sided affair. He spoke on, and I tried to translate what he was saying.
"I joined the R.A.F. at the outbreak of war," he said. "While I was still a 'sprog,' I was released to finish 'The Thief [of Baghdad].' It was during the 'phoney war,' and I wasn't getting much flying, anyway.["]
There is also one instance where British army slang is said to refer to chai tea as "sprog"—although again I can't verify that the spelling is correct in the snippet. From "For Food on the Battle Front," in the Belfast [Northern Ireland] Telegraph (February 26, 1944):
The tea which your driver or batman would produce four or five times a day, strong, dark and sweet, was not such as comes out of your teapot at home. But it was a very present help in time of trouble.They called it chai in the 8th Army, one of the few Arabic words which the British soldier has taken to himself In the 1st Army I found it given the hideous name of sprog, surely one of the ugliest words ever coined In our language.
I did not find any early instances of sprog in the sense of "baby."