Al-Albaani Asked: When Does One Perform the Prostrations of Forgetfulness [Sujood as-Sahw], Before or After Salaam?
by The Albaani Site
Questioner: What is the most correct opinion regarding the prostrations of forgetfulness? [Should they be done] before or after [the salaam]?
Al-Albaani: Both are allowed.
Questioner: And the hadith in which the Prophet ﷺ said, “For each forgetfulness there are two prostrations after giving the salutation?” [Saheeh Abu Dawud, no. 954, Hasan]
Al-Albaani: There are other hadiths which permit the prostration before the salaam, and that is why I said both are allowed.
Al-Hudaa wan-Noor, 338.