Nobody knows where the elves came from into this world. They're so otherworldly that many believe they arrived from another world through a dimensional portal. But the elves themselves have this legend that they don't even need to pass between each other as every elf knows all this from his own dreams.
In the beginning of times before the elves existed, there was the original elf god, who was a great divine jester whom the whole pantheon of gods admired for his performances.
Once one of his lovers took him for a horse ride across the skies. Normal gods don't usually do this kind of thing but this jester was full of crazy ideas... Long story short, his hot seed rained down on the mortal lands...
When the rain was over, thousands of naked elves were discovered all over the world, born from the seed of the elf god.
The naked beauties of divine quality, they had many different fates. Some ended up in slavery, some in temples, some in common life...
People quickly noticed their tendency to do flexible poses about once a day for several hours, something that the elves did instead of sleeping to regain their strength.
Humans tried to put that phenomenon to good use, exhibiting the "wonders", selling them to each other, etc, until they also started noticing the healing aura also generated by those postures.
The elves themselves, when in this trance, would have daydreams about their original godform, which motivated them to attain even greater flexibility. For the elves, spirituality and flexibility were practically the same thing.
Eventually, the abuse and distribution of elven slaves lead to the World War, and at the end of it the majority of the world's population was destroyed, but all of the elves remained as they can't be destroyed: when an elf physically dies, his soul essence immediately goes into the ground and grows a giant mushroom-like plant, which after about two months opens up to reveal the same, fully regenerated elf. The total number of elves in the world was basically fixed.
During the War, the elves also discovered some destructive potential of their contortion magic and their bodies were utilizes as magic weapons by knights against barbarians and vice versa, until nearly every warrior in the world died... Everyone except the elves who couldn't die because of their divine immortality.
The feeble few who remained agreed to end the War.
After the War, the elves gained a very high status, incomparable to their former slave-like existence. They obtained their very own kingdom and all other kingdoms sought their friendship and love in hope that they'd never be ever used as weapons again. Instead, the elves greatly enjoyed having a lot of sex and even being paid for their lovemaking.
The world entered the peaceful "make love, not war" stage for a long while because "friends of my friends are my friends" and everyone was friends with elves.
But eventually some weird mage found a way to open a portal to Hell and the demons who invaded this world and made that mage their vassal in this world, discovered the way to corrupt elven souls and turn them into bendy imps during their regeneration process.
The demons once again rediscovered the idea of using contortion magic as a weapon. Luckily though, they were limited to the desert's climate, but the bad thing was that the desert started to slowly expand because of the demonic presence...
It was inevitable that elves would have to be come magic weapons once again, not to mention more and more elves were getting captured and turned into imps.
This time knights, barbarians, elves and the rest of the world united their forces. The elves started to practice their contortions twice as hard at military camps to attain the greater level of spells they can cast with contortion magic.
Meanwhile, in the demon camps the limber imps were also getting mercilessly trained by the demonic brutes. As well as captive elves who were BDSM'ed into submission and then ritualistically sacrificed to turn them into imps.
The demons (who originally lived in a volcanic dimension) got very addicted to the new world's desert climate, which to them felt just sweet... Although they hated the suffocating green areas, so they did look forward to spreading the desert across the entire new world and make it some sort of a "resort" extension of their infernal dimension... A place where the demons can rest, watch the dancing imps and all around is covered in the seas of soft sand instead of roughlands and lava.
Will the demon dream come true? So far it's hard to tell, but humans and elves do their best to unite and train together the best they can to prevent that...