When Were Surat Al-Falaq and Surat An-Nas Revealed?
Question

When were Surat Al-Falaq and Surat An-Nas revealed? Is the Hadith about the eleven knots which were tied to bewitch the Prophet (blessings and peace of Allah be upon him) Sahih?
Praise be to Allah.The Hadiths indicate that the Mu`awwidhatayn (Al-Falaq and An-Nas) were revealed in Madinah.
This is mentioned in the Hadith of `Uqbah ibn `Amir (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Do you not see verses that have been revealed tonight, the like of which has never been seen? {Say, “I seek refuge in the Lord of daybreak} [Al-Falaq 113; interpretation of the meaning] and {Say, “I seek refuge in the Lord of mankind} [An-Nas 114; interpretation of the meaning].”
`Uqbah ibn `Amir (may Allah be pleased with him) accompanied the Prophet (blessings and peace of Allah be upon him) in Madinah, and these two Surahs were revealed after the bewitching incident.
`Abd ibn Humayd (may Allah have mercy on him) narrated in Al-Muntakhab (1/228): Ahmad ibn Yunus told me: Abu Mu`awiyah told us, from Al-A`mash, from Yazid ibn Hayyan, from Zayd ibn Arqam (may Allah be pleased with him), who said: A Jewish man bewitched the Prophet (blessings and peace of Allah be upon him), and he fell sick. Jibril came to him, bringing down Al-Mu`awwidhatayn, and said: A Jewish man has bewitched you, and the item used for witchcraft is in the well of So-and-so. So he sent `Ali, who brought it to him, then he instructed him to untie the knots and recite verses, so he started reciting and untying, until the Prophet (blessings and peace of Allah be upon him) got up as if he had been released from restraints. The Messenger of Allah (blessings and peace of Allah be upon him) did not say anything to that Jewish man about what he had done to him, and he never confronted him with it.
The narrators of this chain of narration are trustworthy; it was classed as authentic by the commentators on the book, and by Shaykh Al-Albani in As-Silsilah As-Sahihah (6/617)
Al-Hafidh Ibn Hajar (may Allah have mercy on him) said:
He said: Because of that, Al-Mu`awidhatayn were revealed. (End quote)
This was narrated by Ath-Tha`labi from Ibn `Abbas (may Allah be pleased with him) in a Mu`allaq report, and from `A’ishah (may Allah be pleased with her), also in a Mu`allaq report.
The chain of narration going back to `A’ishah is authentic. It was narrated by Sufyan ibn `Uyaynah in his Tafsir from Abu `Ubaydillah, from Hisham ibn `Urwah, from his father, from `A’ishah. In it, it says: And {Qul a`udhu bi Rabb il-falaq} [Surat Al-Falaq; interpretation of the meaning] was revealed.”(At-Talkhis Al-Habir  6/2689.)
As for the number of knots being eleven, no sound Hadith has been narrated concerning that.
Al-Hafidh Ibn Hajar (may Allah have mercy on him) said:
As-Suhayli stated that the number of knots was eleven, so it was appropriate that the number of verses of the Mu`awwidhatayn should be eleven, so that with every verse, one knot was undone.
I say: Al-Bayhaqi narrated in Ad-Dala’il something similar with an inauthentic chain of narration, in the story in which it is said that the Prophet (blessings and peace of Allah be upon him) was bewitched… At the end of the Hadith, it says that they found a string in which there were eleven knots, and Surat Al-Falaq and Surat An-Nas were revealed, so every time he recited a verse, one knot came undone.
Ibn Sa`d (may Allah have mercy on him) narrated with an interrupted chain of narration from Ibn `Abbas (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) sent `Ali and `Ammar (may Allah be pleased with them), and they found a string in which there were eleven knots, and he mentioned a similar report.” (End quote from At-Talkhis Al-Habir 6/2689-2690.)
For more details, please see the following answers: 231102, 82800, 10513, 2241.
And Allah knows best.