We don't know.
It's repeatedly stated in the book The Tales of Beedle The Bard that Beedle's stories are an original creation of the author rather than a retelling of older stories (pace the Brothers Grimm).
Whether any of these stories, especially the Tale of the Three Brothers, had any inspiration that predates Beedle's book isn't known however it's noteworthy that there are no mentions of alternate versions of his stories other than those that derive directly from his book.
If his stories accurately reflect his opinions, he
rather liked Muggles, whom he regarded as ignorant rather than
malevolent; he mistrusted Dark Magic, and he believed that the worst
excesses of wizardkind sprang from the all-too-human traits of
cruelty, apathy, or arrogant misapplication of their own talents. The
heroes and heroines who triumph in his stories are not those with the
most powerful magic, but rather those who demonstrate the most
kindness, common sense, and ingenuity.*
The Tales of Beedle The Bard - Foreword by JKR
and
A pro-Muggle story showing a Muggle-loving father as superior in magic
to a Muggle-hating son? It is nothing short of amazing that any copies
of the original version of this tale survived the flames to which they
were so often consigned.
The Tales of Beedle The Bard - ALBUS DUMBLEDORE
on “The Wizard and the Hopping Pot”
and
“The Warlock’s Hairy Heart,” however, does not appear to have been
modified or much criticized in the hundreds of years since it was
first written; the story as I eventually read it in the original runes
was almost exactly that which my mother had told me.
The Tales of Beedle The Bard - ALBUS DUMBLEDORE
on “The Warlock’s Hairy Heart”
and
Though some six centuries have elapsed since Beedle wrote this tale,
and while we have devised innumerable ways of maintaining the illusion
of our loved ones’ continuing presence
The Tales of Beedle The Bard - ALBUS DUMBLEDORE
on “Babbitty Rabbitty and Her Cackling Stump”
and
The irony is that a curious legend has grown up around this story,
which precisely contradicts the message of the original.
The Tales of Beedle The Bard - ALBUS DUMBLEDORE
on “The Tale of the Three Brothers”
With regard to the final story in the book, given the close similarity between Beedle's story and the artifacts that the Peverell Brother are supposed to have created (some three hundred years before the book was written), it's feasible albeit unlikely, given their substantial age differences, that he'd actually met with one of the three brothers. Failing that, he may have simply been told the story by someone with a connection to one of the minor characters.