When it is said
It belongs to no service. Anyone who is ill can say it at any time, as often as they need.
Where it comes from
Author known
Who were Barsanuphius and John?
Barsanuphius and John, called the Prophet, were two elders who answered questions by letter. Their answers reached the people who asked through Seridos, the abbot of a monastery in Gaza. The collection holds 850 questions from hermits, monks, bishops and lay people, and it reflects the spiritual guidance of the 5th and 6th centuries.
Barsanuphius and John, Guidance to the Spiritual Life (Russian), azbyka.ru
His answer to a disciple
A disciple asked whether, if he asked the saints to pray, healing would come at once, even when it might not be good for him. John said it is not good to press God for healing without knowing what is good for us, for the Father knows what we need before we ask (Matthew 6:8). He gave him this prayer and told him to give thanks in everything (1 Thessalonians 5:18).
In Russian
Владыко! Я в руках Твоих,
помилуй меня по воле Твоей,
и, если мне полезно, исцели меня вскоре.