I couldn't speak as to how common it was (happy for someone else to enlighten me on that), but it did definitely happen and I can point out one or two examples of it happening.
Obviously when it'd be most likely to happen is during the final years of the transatlantic trade when you had the blockade of africa with the royal navy stopping ships leaving africa and freeing the slaves before they left the continent. This was also when you saw the various back to africa emigrations of slaves and their descendents from usa, jamaica, canada and brazil and it's possible that did avoid people returning to their own lands though as a rule the areas they moved to wasn't also where most slaves were bought. So Thomas Peters was from modern day Nigeria, was a slave in the USA, fought for the british in the American Revolution, was resettled in Canada and then formed Freetown as a town for ex-slaves in Sierra Leone, which is still West Africa but 1,000 miles away from where he was captured.
But we'll look earlier for my one concrete example. In the 1740s you had William Ansah Sessarakoo who was the son of John Corrente in modern day Ghana. Corrente was an important slave trader and leader of the Fante people who wanted his sons to have a european education, one was educated in France and William was to be educated in England. But the ship's captain who was to transport William double crossed John and instead sold William into slavery. As a result John vowed to exclusively trade with the French. A little later William was spotted in Barbados and freed by the British in order to curry favour with John.
William spent around three years as a slave and then another two in England where he was welcomed into high society by a British aristocracy eager to make amends to the Fante, who were an important source of slaves. After those five years William returned home and lived out his life as the notable leader and dealer in slaves he was before his sale.
Incidentally the exact same story of a leading African slave trader sending his son to be educated in England and the white slave trader he trusted instead selling him into slavery also happened in the 1810s to King Adandozan of Dahomey in modern day Benin, though the sources there are less clear as to where they went and if he got them back. Dahomey during it's later years had close relations with Brazil with brazilian born slavers and freed slaves both moving to Dahomey and numerous letters passing back and forth. There's a lot of local folklore which involve people from Dahomey travelling to Brazil to buy back their relatives from slavery, I'm willing to assume something like that will have happened.
Likewise with Dahomey we have Sara Forbes Bonetta who was a Nigerian slave captured by King Ghezo of Dahomey as a five year old child and who was originally going to be sacrificed in a vodun ceremony but at the insistence of Frederick Forbes of the British Navy was instead sold to Queen Victoria. Problem with that is this was 1848, slavery in the British Empire had been abolished in 1834. So Sara was freed, became Victoria's goddaughter and settled back in British Lagos, not far from where she was captured, upon being married. Not really a direct victim of the transatlantic slave trade though.
In the doesn't quite count category, we also have Abraham Samuel, a mixed race ex slave from the French West Indies who landed in Madagascar in the 1690s as part of a privateer ship raiding french ships in the indian ocean on behalf of Rhode Island and the British Empire. Samuel was recognised as being a long lost Malagasy chief who'd been sold into slavery as a child years earlier and so left his ship and stuck around on Madagascar becoming the leader of a significant area of land.
This is less clear cut than it sounds because most modern historians think Samuel was born in Martinique, had no previous connection with Madagascar and he and the person who recognised him were just running a con to gain power but it's worth mentioning.
So I can't say how common it was, but the question was did it happen and the answer is yes.