When it is said
It is the first of the prayers before sleep in the Russian prayer book. It is said every night, after a few short opening prayers and “Lord, have mercy” said 12 times. Orthodox churches in America that use the Russian book say it too, in English.
Greek Orthodox Christians do not use this set of prayers. They pray a short night service instead, called Small Compline.
Where it comes from
Author doubtful
Who was Macarius?
St Macarius the Great, also called Macarius of Egypt, lived from about AD 300 to about 390. He founded the monks’ settlement of Scetis in the Egyptian desert. The Orthodox Church remembers him on 19 January.
First found in Moscow
The prayer first appears in the rule the Chudov Monastery in the Moscow Kremlin wrote for its monks, about 1370. There it is the first of five prayers a monk could say alone in his room before sleep, if he chose. Printed Russian prayer books kept it first. From 1679 they printed the same set of prayers before sleep that is still used today.
Priest Pyotr Pchelintsev, on the history of the morning and evening prayers (in Russian); Hieromonk Dalmat (Yudin), on the prayers before sleep (in Russian)
What the words mean
Enemies of the flesh and without flesh
The prayer asks to overcome our enemies, and a Russian note on it reads these enemies as sins. Some belong to the body, such as gluttony and lust. Others belong to the soul, chief among them love of money, anger, dejection, listlessness, the hunger for praise, and pride. Together they are the eight thoughts St John Cassian taught monks to watch for.
My lowly bed
A Russian note on the prayer explains why it calls the bed lowly. In the prayers before sleep, sleep is a picture of death, so the lowly bed is a picture of the grave.
What people get wrong
Did Macarius write it?
Probably not. No Greek copy is known. The oldest copies are Slavonic, from the later 1300s, and they name no author. The Orthodox Encyclopedia says that a number of prayers under his name, in Greek and in Slavonic, are clearly not his.
Orthodox Encyclopedia, Macarius the Great (in Russian); Hieromonk Dalmat (Yudin), Theological Herald 31, 2018 (in Russian)
The Scripture in it
Therefore, beloved, since we have these promises, let us cleanse ourselves from everything that defiles body and spirit, perfecting holiness in the fear of God.
I will lie down and sleep in peace, for You alone, O LORD, make me dwell in safety.
Beloved, I urge you, as foreigners and exiles, to abstain from the desires of the flesh, which war against your soul.
Bible text: Berean Standard Bible, public domain.
In Church Slavonic
Боже вечный и Царю всякаго создания, сподобивый мя даже в час сей доспети, прости ми грехи, яже сотворих в сей день делом, словом и помышлением, и очисти, Господи, смиренную мою душу от всякия скверны плоти и духа.
И даждь ми, Господи, в нощи сей сон прейти в мире, да востав от смиреннаго ми ложа, благоугожду пресвятому имени Твоему, во вся дни живота моего, и поперу борющия мя враги плотския и безплотныя.
И избави мя, Господи, от помышлений суетных, оскверняющих мя, и похотей лукавых.
Яко Твое есть Царство, и сила и слава, Отца и Сына и Святаго Духа, ныне и присно и во веки веков. Аминь.
From the Russian prayer book, in modern Russian letters, on the Orthodox portal Azbyka.ru.