Pirkei DeRabbi Eliezer 34 reads as follows:
All the seven days of mourning the
soul goeth forth and returneth from its (former) home to its sepulchral abode,
and from its sepulchral abode to its (former) home. After the seven days of
mourning the body || begins to breed worms, and it decays and returns to the
dust, as it originally was, as it is said, "And the dust returns to the
earth as it was" (Eccles. 12:7). The soul goes forth and returns to the
place whence it was given, from heaven, as it is said, "And the soul
returns unto God who gave it" (ibid.). And whence do we learn that
the soul has been given from heaven? Come and see. When the Holy One, blessed
be He, formed man, he did not have in him the spirit. What did the Holy One,
blessed be He, do? He breathed with the spirit of the breath of His mouth, and
cast a soul into him, as it is said, "And he breathed into his nostrils
the breath of life" (Gen. 2:7).
What is rather interesting is that this text understands Eccl 127,
a common “proof-text” for soul sleep, is understood as evidence that the soul
of a deceased person returns to heaven, whence it had come (cf. Alma 40:11). For more, see:
Response to Douglas V. Pond on Biblical and LDS Anthropology and Eschatology