The Messenger of Allah (May peace be upon him) said to me: when you go to bed while you are in the state of purification, lay your head on your right hand. He then mentioned the rest of the tradition in a similar manner as above.
لِي رَسُولُ اللَّهِ ﷺ إِذَا أَوَيْتَ إِلَى فِرَاشِكَ وَأَنْتَ طَاهِرٌ فَتَوَسَّدْ يَمِينَكَ ثُمَّ ذَكَرَ نَحْوَهُ