Sunan Ibn Majah, Volume 2, Book 5, Hadith 1290 (DarusSalam) ⓘ
It was narrated that ‘Abdullah bin Sa’ib said: “I attended the ‘Eid prayer with the Messenger of Allah. He led us in offering the ‘Eid prayer, then he said: ‘I have finished the prayer. Whoever wants to sit (and listen to) the sermon, then let him sit, and whoever wants to leave, then let him leave.’”
حَدَّثَنَا هَدِيَّةُ بْنُ عَبْدِ الْوَهَّابِ، وَعَمْرُو بْنُ رَافِعٍ الْبَجَلِيُّ، قَالاَ حَدَّثَنَا الْفَضْلُ بْنُ مُوسَى، حَدَّثَنَا ابْنُ جُرَيْجٍ، عَنْ عَطَاءٍ، عَنْ عَبْدِ اللَّهِ بْنِ السَّائِبِ، قَالَ حَضَرْتُ الْعِيدَ مَعَ رَسُولِ اللَّهِ ـ صلى الله عليه وسلم ـ فَصَلَّى بِنَا الْعِيدَ ثُمَّ قَالَ " قَدْ قَضَيْنَا الصَّلاَةَ فَمَنْ أَحَبَّ أَنْ يَجْلِسَ لِلْخُطْبَةِ فَلْيَجْلِسْ وَمَنْ أَحَبَّ أَنْ يَذْهَبَ فَلْيَذْهَبْ " .
also referenced under: Hadith 1290 (Reference) & Book 5, Hadith 1349 (In-Book)