Genesis 9:24
23 Shem and Japheth took the garment and placed it on their shoulders. Then they walked in backwards and covered up their father’s nakedness. Their faces were turned the other way so they did not see their father’s nakedness. 24 When Noah awoke from his drunken stupor he learned what his youngest son had done to him. 25 So he said,“Cursed be Canaan! The lowest of slaves he will be to his brothers.”
Pseudo Jonathan Genesis 9:24
23 But Shem and Japheth took a mantle, placed it on both their shoulders, and going backwards, covered their father’s nakedness; their faces were turned away so that they did not see their father’s nakedness. 24 When Noah awoke from his wine, he knew by being told in a dream what had been done to him by Ham his son, who was slight in merit because he was the cause of his not begetting a fourth son. 25 And he said, 'Cursed be Canaan, who is his fourth son. A slave reduced to slavery shall he be to his brothers.'
Notes and References
"... Targum Pseudo-Jonathan, alone among the Targums, explains how Noah could have known what had happened to him when he was drunk. The source of Pseudo-Jonathan’s addition is not known. Pseudo-Jonathan sometimes tells how hidden things were revealed to different people (compare Exodus 1:15; 32:20, 28; Numbers 31:18; Deuteronomy 21:8). ..."
Maher, Michael Targum Pseudo-Jonathan, Genesis (p. 46) Liturgical Press, 1992