I searched on Charles Earle Funk's etymological series for this. Seems that it stems from an older phrase "ruts, bumps, and thank-you-ma'ams," meaning a bump in the road. In Horsefeathers & Other Curious Words (1958), he writes about thank-ye-ma'am [on p. 218]:
This, gratefully appreciated in rural American courtship in grandfather's day, is now rapidly disappearing, replaced by humdrum metal or concrete culverts on hilly roads everywhere. On early roads in such country, an earthen diagonal ridge served to carry rain water or melting snow from high side to low side, thus preventing excessive wash. But, passing over it in a carriage or wagon, the passenger on the side first hitting this ridge would sway involuntarily towards the other. The rural swain, needless to say, chose roads accordingly. With the head of the fair one thus within kissing distance, the greatful murmur, "Thank ye, ma'am," was of course passed along to the humble cause.
So the phrase in question would seem to be a natural progression from a quick kiss to a 'quickie' as mores changed over time.
Unless someone else has more information, that's probably it.
(you remember Funk, of course, from his work with Wagnells.)