Where does the custom to steal the Afikoman come from? The source is not clear, but the Chok Yaakov (472:2) says it could come from the Gemara in Pesachim (109a): The Gemara says, "We grab the matzah on pesach night so the children don't sleep."
We could explain the Gemara based on the
the Rambam (7:3), who says we do UNUSUAL THINGS by the Seder for the children to see and be motivated to ask. He then brings a few examples, including Gemarah grabbing the matzah. (Also brought in Aruch HaShulchan 472:2).
However, Rashi and Rashbam (109a) interpret the Gemara differently, suggesting it refers to lifting the Seder plate so the children ask questions, eating the matzah quickly, or grabbing the matzah from the children to prevent overeating.
According to them, there's no specific source for the custom. Nevertheless, many observe this custom, and it's advisable not to alter established practices.
It's worth noting Rav Shimon Schwab is quoted (Rav Schwab on prayer) as saying, "I personally do not care for the term 'stealing the matzah,' it is un-Jewish to steal-even the afikoman!... Rather, I would call it hiding the matzah."
Similarly, R' Shmuel Kamenetsky is quoted in Kovetz Halachos (page 350) as saying, "It's preferable not to refer to the custom as 'stealing the Afikoman,' rather 'grabbing the Afikoman,' as it's the terminology found in the Gemara.