It is transmitted from Sayyiduna Ibn Abbas (may Allah be pleased with them both) in mawquf form: Whoever falls asleep while sitting, his ablution (remains); and if he lies down, ablution is due upon him.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 595