This motif of unclothing (with or without a subsequent clothing) is ubiquitous in the NT and early Christian and/or Gnostic literature:
2 Corinthians 5:1ff: For we know that if the earthly tent we live in is destroyed, we have a building from God, a house not made with hands, eternal in the heavens. For in this tent we groan, longing to be clothed with our heavenly dwelling-- if indeed, when we have taken it off we will not be found naked. For while we are still in this tent, we groan under our burden, because we wish not to be unclothed but to be further clothed, so that what is mortal may be swallowed up by life.
Colossians 2:11ff: In him also you were circumcised with a spiritual circumcision, by stripping off the body of the flesh in the circumcision of Christ. (...) He stripped off the rulers and authorities and made a public example of them, triumphing over them in it. (...) Do not lie to one another, seeing that you have stripped off the old man with his practices
The use of tithemi in GJohn is also interesting:
"I am the good shepherd. The good shepherd lays down his life for the sheep. (...) I lay down my life for the sheep. (...) For this reason the Father loves me, because I lay down my life in order to take it up again. No one takes it from me, but I lay it down of my own accord. I have power to lay it down, and I have power to take it up again.
Jesus, knowing that the Father had given all things into his hands, and that he had come from God and was going to God, got up from the table, laid down his robe, and tied a towel around himself. (...) After he had washed their feet, had put on his robe, and had returned to the table, he said to them, "Do you know what I have done to you?
Peter said to him, "Lord, why can I not follow you now? I will lay down my life for you." Jesus answered, "Will you lay down your life for me? Very truly, I tell you, before the cock crows, you will have denied me three times.
No one has greater love than this, to lay down one's life for one's friends.
Now there was a garden in the place where he was crucified, and in the garden there was a new tomb in which no one had ever been laid. And so, because it was the Jewish day of Preparation, and the tomb was nearby, they laid Jesus there.
"They have taken the Lord out of the tomb, and we do not know where they have laid him." (...) "They have taken away my Lord, and I do not know where they have laid him." (...) "Sir, if you have carried him away, tell me where you have laid him, and I will take him away."
Perhaps we have a reaction to the old practice of nakedness as the symbol of salvation (also attested in Mark, with the escape of the naked young man, and more obviously in Secret Mark) in a strange detail of the latter conclusion (chapter 21):
That disciple whom Jesus loved said to Peter, "It is the Lord!" When Simon Peter heard that it was the Lord, he put on some clothes, for he was naked, and jumped into the sea.
It is also noteworthy that in GThomas logion 37 is linked with another "synoptic" saying in logion 36:
Jesus says: "Do not worry from morning to evening and from evening to morning about what you will wear."
For a full-fledged Gnostic use of the symbolism, cf. for instance the Gospel of Philip:
Those who say that the Lord died first and (then) rose up are in error, for he rose up first and (then) died. If one does not first attain the resurrection, he will not die. As God lives, he would [...].
No one will hide a large valuable object in something large, but many a time one has tossed countless thousands into a thing worth a penny. Compare the soul. It is a precious thing and it came to be in a contemptible body.
Some are afraid lest they rise naked. Because of this they wish to rise in the flesh, and they do not know that it is those who wear the flesh who are naked. It is those who [...] to unclothe themselves who are not naked. "Flesh and blood shall not inherit the kingdom of God" (1 Co 15:50). What is this which will not inherit? This which is on us. But what is this, too, which will inherit? It is that which belongs to Jesus and his blood. Because of this he said "He who shall not eat my flesh and drink my blood has not life in him" (Jn 6:53). What is it? His flesh is the word, and his blood is the Holy Spirit. He who has received these has food and he has drink and clothing. I find fault with the others who say that it will not rise. Then both of them are at fault. You say that the flesh will not rise. But tell me what will rise, that we may honor you. You say the Spirit in the flesh, and it is also this light in the flesh. (But) this too is a matter which is in the flesh, for whatever you shall say, you say nothing outside the flesh. It is necessary to rise in this flesh, since everything exists in it. In this world, those who put on garments are better than the garments. In the Kingdom of Heaven, the garments are better than those that put them on.
The powers do not see those who are clothed in the perfect light, and consequently are not able to detain them. One will clothe himself in this light sacramentally in the union.
The cup of prayer contains wine and water, since it is appointed as the type of the blood for which thanks is given. And it is full of the Holy Spirit, and it belongs to the wholly perfect man. When we drink this, we shall receive for ourselves the perfect man. The living water is a body. It is necessary that we put on the living man. Therefore, when he is about to go down into the water, he unclothes himself, in order that he may put on the living man.