Riyad as-Salihin, Book 1, Hadith 103 (In-Book)

Ibn Mas'ud (May Allah be pleased with him) said: One night I joined the Prophet in his (optional) Salat. He prolonged the standing so much that I thought of doing something evil. He was asked: "What did you intend to do?" He replied: "To sit down and leave him".[Al-Bukhari and Muslim].

التاسع‏:‏ عن ابن مسعود رضي الله عنه قال‏:‏ صليت مع النبي صلى الله عليه وسلم ليلة، فأطال القيام حتى هممت بأمر سوء‏!‏ قيل‏:‏ وما هممت به‏؟‏ قال‏:‏ هممت أن أجلس وأدعه‏.‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com