Bhagavad Gita 2.68
Chapter 2: The yoga of knowledge
तस्माद्यस्य महाबाहो निगृहीतानि सर्वशः ।
इन्द्रियाणीन्द्रियार्थेभ्यस्तस्य प्रज्ञा प्रतिष्ठिता ॥ ६८ ॥
Therefore, O mighty-armed, whose senses are all completely restrained from the objects of sense, of him the understanding is well poised.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.