Praise be to Allaah.
It is better for neighbours and relatives to make food in their own houses then bring it to the household (of the deceased), because it was narrated that when the Prophet (peace and blessings of Allaah be upon him) heard that his cousin Ja’far ibn Abi Taalib (may Allaah be pleased with him) had died in the Battle of Mu’tah, he told his family to make food for the family of Ja’far, and said, “Because there has come to them that which will preoccupy them.”
But it is not permitted for the family to make food for people because for the sake of the deceased. This is one of the actions of the Jaahiliyyah, whether it is done on the day of the death, or on the fourth or tenth day after the death, or at the new year. All of that is not permitted, because it was narrated that Jareer ibn ‘Abd-Allaah al-Bajali (may Allaah be pleased with him) – one of the companions of the Prophet (peace and blessings of Allaah be upon him) – said, “We used to count gathering with the family of the deceased and making food for them after the burial to be a kind of wailing (niyaahah).”
But if guests come to the family of the deceased during the mourning period, there is nothing wrong with them making food for them for the sake of hospitality, and there is nothing wrong with the household inviting whoever they want of their neighbours and relatives to eat with them from the food that has been given to them. And Allaah is the Source of strength.