This expression is commonly used to describe a pregnant woman.
It’s believed the phrase originated in the 1951 novel The Cruel Sea by Nicholas Monsarrat.
In the book, the character Bennett says to two other characters, Morell and Ferraby, “I bet you left a bun in the oven, both of you,” after the two seamen enjoyed a night ashore.