This was said by the Buddha, the Perfected One: that is what I heard.
“Mendicants, when a mendicant has two qualities they live happily in the present life—without distress, anguish, and fever—and when the body breaks up, after death, they can expect a good rebirth. What two? Guarding the sense doors and moderation in eating. When a mendicant has these two qualities they live happily in the present life—without distress, anguish, and fever—and when the body breaks up, after death, they can expect a good rebirth.”
That is what the Buddha said. On this it is said:
“Eye, ear, nose, tongue,
body, and likewise mind:
a mendicant who makes these
sense doors well guarded—
eating in moderation,
restrained in the sense faculties—
both physical and mental.
Not burning in body,
not burning in mind,
by day or by night
such a person lives in happiness.”
This too is a matter that was spoken by the Blessed One: that is what I heard.
Read this translation of Itivuttaka 29 Sukhavihārasutta: Living in Happiness by Bhikkhu Sujato on SuttaCentral.net. Or read a different translation on SuttaCentral.net, SuttaFriends.org, or DhammaTalks.org.