Most people believe that the 36 stratagems were compiled during the Spring and Autumn Period (春秋时代 chūn qiū shí dài) (770-476 BCE), and the Warring States Period (战国时期 zhàn guó shí qí) (475-221 BCE), and thus assume that the stories associated with them must have come from a long time ago. However, this is not the case.
When they were originally composed, the 36 Stratagems were descriptions of conceptual stratagies that did not allude to any specific story or historical event. It wasn't until much later on in the Ming (明朝 míng cháo) (1368-1644 ADE) and Qing Dynasties (清朝 qīng cháo) (1644-1912 ADE) that the book was completed. The stories were added to make the concepts more easy to understand, and to bring life to the book.
And for this particular stratagem, a story was taken from the 'Journey to the West' (西游记 xī yóu jì) which described one of the many adventures of the Monkey King (孙悟空 sūn wù kōng) and his master, Tang Seng (唐僧 táng sēng).
There is a chapter in the Journey to the West called "Disaster in Avalokitesvara's Temple" (祸起观音院 huò qǐ guān yīn yuàn). It tells the story of Tang Seng who is on a pilgrimage in search of Buddhist scrolls when he comes across the temple of Avalokitesvara. He is greated by his host, the elder Jin Chi (金池长老 jīn chí zhǎng lǎo). However, unbeknownst to Tang Seng, his host had set his mind on stealing his kasaya1, and was willing to do anything to obtain it.
1 a kasaya or a cassock; a patchwork outer vestment worn by a Buddhist monk