Abu Hurairah (RA) reported Allah's Messenger (ﷺ) as saying: When anyone amongst you stands up, and in the hadith transmitted on the authority of Abu 'Awina, the words are: "He who stands in his place and (goes away) and then comes back to it, he has the greatest right (to occupy that).
Related hadith on this topic
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: From this hadith, it is understood that if a person is sitting somewhere, then he gets up and leaves for some temporary natural or human need with the intention of returning, and he comes back soon, then he is entitled to his place. He can ask the one sitting in his place to vacate it. It is better in such a situation that he leaves something at his place before going, so that others may know that someone is sitting there. However, it is not correct for a person to finish the Maghrib prayer, leave a tasbih, cloth, or miswak, etc., at his place, and then come at the time of Isha and demand to sit in that place.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 5689
Shaykh Umar Farooq Saeedi
Benefits and Issues:
This ruling appears to pertain to scholarly and specific gatherings, where people sit in an organized manner with due diligence.
In general assemblies, if someone wishes to leave and return, he should leave some sign at his place.
As is mentioned in the following narration.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 4853