This little nugget of wisdom must have been the outcome of a lifetime of varied experiences and deep reflection.
Devanagari text:
Source: This is the 2317th verse quoted in Subhaashitaavali (सुभाषितावलि), "A series of good sayings," compiled by the 10th century Kashmiri scholar Vallabhadeva (वल्लभदेव) who is primarily known for his commentary on Kalidasa's Raghuvamsha. It appears that the anthologist has ascribed this couplet (and a few other comedic snippets) to one Maya (मय) but the relevant text is ambiguous and no information is available on this author.
I think it is safe to assume that this quote comes from a satirical work where it was spoken by a kuTTanI (कुट्टनी: the female manager of a house of prostitution) or a viTa (विट: a man about town who is usually of noble birth but has fallen on hard times) or a similar character typically used as a mouthpiece of depravity in Sanskrit literature and drama. A satire would often be prefaced with a disclaimer clarifying that the aim of the work was to prevent the spread of debauchery in society by reducing purported transgressors to butts of ridicule. This is how humorists would often get away with writings such as the above, and there's no telling what they were actually thinking when they penned these lines. As they say, many a true word is spoken in jest. :)
Devanagari text:
प्रपायां पीयते वारि सत्त्रागारेऽपि भुज्यते|
सुप्यते देवसदने यभ्यते यत्र लभ्यते||
सुप्यते देवसदने यभ्यते यत्र लभ्यते||
Harvard-Kyoto transliteration:
prapAyAM pIyate vAri sattrAgArepi bhujyate|
supyate devasadane yabhyate yatra labhyate||
supyate devasadane yabhyate yatra labhyate||
– Anonymous
Loose translation: One should drink water at a free water dispensing station1, eat at a charitable eatery2, sleep in a house of worship3, and enjoy intercourse wherever it is available.
I think it is safe to assume that this quote comes from a satirical work where it was spoken by a kuTTanI (कुट्टनी: the female manager of a house of prostitution) or a viTa (विट: a man about town who is usually of noble birth but has fallen on hard times) or a similar character typically used as a mouthpiece of depravity in Sanskrit literature and drama. A satire would often be prefaced with a disclaimer clarifying that the aim of the work was to prevent the spread of debauchery in society by reducing purported transgressors to butts of ridicule. This is how humorists would often get away with writings such as the above, and there's no telling what they were actually thinking when they penned these lines. As they say, many a true word is spoken in jest. :)
1 The word used by the poet is prapA (प्रपा) which, according to Monier-Williams' Sanskrit-English dictionary, has the following meanings: a place for supplying water, a place for watering cattle or a shed on the road-side containing a reservoir of water for travellers, fountain, cistern, well. Synonyms in Sanskrit and other Indic languages include pAnIyazAlA (पानीयशाला), pAnIyazAlikA (पानीयशालिका), jalasattra (जलसत्त्र), and derivatives thereof. Historically, wealthy members of royal, aristocratic, and merchant families in many principalities of South Asia would set up these prapAs at public locations for the benefit of thirsty travelers and domestic animals. It was considered an act of great merit, and anyone found guilty of vandalizing such a site would be fined heavily.↩
2 The word sattrAgAra (सत्त्रागार) used here, along with its synonyms sattrazAlA (सत्त्रशाला), sattragRha (सत्त्रगृह), pratizraya (प्रतिश्रय) etc., refers to a hall where free food was served, especially to Brahmins, religious mendicants, and indigents. The word sattra (सत्त्र) originally denoted a particular Vedic sacrifice but was later generalized to cover a wide variety of religious ceremonies, charitable acts, and public works (such as asylums and hospitals). This practice still survives in the form of annachatras (अन्नछत्र) and free prasAda (प्रसाद) distributions organized by several Hindu temples and organizations as well as langars (Hindi: लंगर) or free-for-all communal meals offered by followers of Indo-Persian Sufism (see also Langar Khana), Sikhism, and the Ravidassia and Balmiki belief systems.↩
3 The word used in the original is devasadana (देवसदन), "abode of God / gods." Why is sleeping in a house of worship recommended? Presumably because the peaceful ambience is itself soporific (of course, depending on the faith group to which the establishment belongs), and sleep can be passed off as meditation so that others would not think to disturb you.↩