Is there a mythical/folklore origin for them? I haven't managed to find any sources on this.
Well, it depends. A big problem here is that the sources are not entirely clear on the classification of different non-humans. Thus, what in modern minds (perhaps influenced by role playing games) are differing monsters, such as giants and trolls, are sometimes indistinguishable in Norse sources.
Thus, depending on your interpretation, there are at least two ways to see the origins of trolls:
- If you see trolls as a clearly distinct category, where they would be a race rather close to humans in size, knowledgeable in magic (in modern continental Nordic languages, the word for "magic" is derived from "troll"), possibly demonic, then no, there is no particular origin for them. They simply exist.
- If you instead see "troll" as more of less a synonym of "jötun", then their origin can be found in Snorri's Edda: They were the offspring of Ymir, a man and a woman sprung from each of his armpits, and more were generated from a joining of his legs.