Deuteronomy 21:23

23 his body shall not remain all night on the tree, but you shall bury him the same day, for a hanged man is cursed by God. You shall not defile your land that the Lord your God is giving you for an inheritance.