There is a fine book called Heavens to Betsy: and Other Curious Sayings by Charles Earle Funk, editor-in-chief of Funk & Wagnell's Standard Dictionary Series. (He also wrote three other volumes: A Hog on Ice, Thereby Hangs a Tale, and Horsefeathers.) Funk write for just under two pages in his introduction to his book about the origin and ultimate meaning of heavens to Betsy, "however, despite exhaustive research, I am reluctantly forced to resort to the familiar lexicographical locution, 'Source unknown'." His books are still in print or can usually be found, as a set, in used book stores. They date from the late 40s to early 50s.