This is an American english slang phrase, made popular in the 50s.
Is a description of quick, noncommital sex. During the 50s and 60s this was considered a bad thing, and girls were warned about "men who only wanted one thing."
In the 70 and 80s the term zipless F*ck basically took its place in the vernacular.
We don't use the word "Ma'am" much anymore, so it's rare to "thank a ma'am" for quick sex, even if you enjoyed it.