Shama-il Tirmidhi Chapter 38, Hadith Number 6 (247).

Abu Qataadah Radiyallahu ‘Anhu relates: “If Rasulullah Sallallahu ‘Alayhi Wasallam made an early journey-break in the last portion of the night on his travels, he slept on his right side. If he was staying there till before the morning, he lifted his right arm, put his head on it and slept”.

The reason being that if there was more time he lay flat and slept. His noble habit was to sleep on the right side. But if time was short, he lifted his arm and slept on it for a little while. In such circumstances he did not lie flat and sleep, as this might result in a deep slumber, and the time for the salaah would pass.