Al-Sha'bi (may Allah have mercy on him) says that a sheep which had eaten some dough was brought to Shurayh (may Allah have mercy on him). He asked: "By day or by night?" They said: "By day." So he declared it of no account and recited: "when the people's sheep strayed into it" [al-Anbiya: 78], and said: Nafsh (straying) is only at night.
In the narration of Qatadah from al-Sha'bi: A sheep that had damaged some spun yarn was brought to Shurayh. Al-Sha'bi said: "Watch him; he will ask them whether it was by night or by day." He asked them and said: "If it was by night, you are liable; if it was by day, there is no liability upon you." He also said: Nafsh is at night, and haml (roaming unattended) is by day.
Murrah narrated from Masruq concerning "when the people's sheep strayed into it" [al-Anbiya: 78]: It was a vineyard; they entered it at night and left nothing green in it.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأشربة والحد فيها / 17685