Could you further explain this custom? Is there a specific phrase you use in regard to this?
Japan is a very hospitable place, but to my knowledge, there's no institutionalized custom of opening their homes to lost strangers. I suppose it depends on where you are and who you encounter, though.