The Buddha advises Tissa Metteyya on the dangers of engaging in sexual activity and the benefits of solitary conduct.

Tissametteyya sutta - To Tissa Metteyya

Thus the Venerable Tissa Metteyya said: "For one engaged in sexual activity, speak of the obstacles, dear sir; Having heard your teaching, we shall practice in solitude."
The Blessed One addressed Metteyya: "One engaged in sexual pursuits, tends to forget or disregard the teachings; And practices the wrong path, this is considered ignoble in him.
Whoever, once solitary in conduct, now engages in sexual activity; He resembles a broken vehicle, and is deemed lowly by ordinary people.
His fame and renown, which were once prominent, now decline or completely fade; Seeing this as well, you should practice to abandon sexual activity.
Enclosed by intentions, he broods like a miser; Upon hearing the criticism of others, such a one becomes disturbed.
Provoked by others' reproach, he responds with harsh words; Indeed, he comes into a great conflict, by engaging in wrong speech.
Regarded as wise, and dedicated to solitary conduct; But then engaging in sexual activity, he will become weary as if enfeebled.
Understanding this danger, the sage, reflecting on both past and future; should firmly establish solitary conduct, and refrain from engaging in sexual activity.
One should train only in seclusion, this is the supreme path for the noble ones; One who would not consider oneself 'best' because of this, he is indeed near to Nibbāna.
As the sage dwells, empty of desires, unconcerned with sensual pleasures; Having crossed the flood, they're envied, by those bound to sensual pleasures.