Hesiod. Works and Days. (Lines 727-732).
Do not stand upright facing the sun when you make water, but remember to do this when he has set towards his rising. And do not make water as you go, whether on the road or off the road, and do not uncover yourself: the nights belong to the blessed gods. A scrupulous man who has a wise heart sits down or goes to the wall of an enclosed court.