Imam al-Shafi'i (may Allah have mercy on him), commenting on the narration of Sayyiduna Anas (may Allah be pleased with him), said: The Prophet (peace and blessings be upon him) would not attack before morning, yet attacking at any time of day or night is permissible, not forbidden, and an attack may also be made while the enemy is unaware. Rather, he (peace and blessings be upon him) did this as a precaution, so that those with him could see how they were attacking and would not be struck from an ambush or from where they did not perceive; and he would not attack at night lest the Muslims end up killing one another, as happened in the killing carried out by Ibn Atik, when they cut the leg of one of their own companions.
Imam al-Shafi'i (may Allah have mercy on him) said: The Prophet (peace and blessings be upon him) commanded the Companions (may Allah be pleased with them) to raid several of the Jews, such as Abu Rafi' Abdullah bin Abi al-Huqayq, who was also called Sallam bin Abi al-Huqayq.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 18099