By Nick Pisa in Perugia
Published: 6:00AM GMT 23 Nov 2009
The Pope, who died five years ago, is being considered for sainthood by the Catholic Church.
As part of the Vatican's investigation thousands of documents have been collected and examined by officials from the Congregation for the Causes of Saints.
Among them is the testimony of Tobiana Sobodka, a Polish nun of the Sacred Heart of Jesus order, who worked for Pope John Paul in his private Vatican apartments and at his summer residence in Castel Gandolfo near Rome.
Sister Sobodka said: "Several times he (Pope John Paul) would put himself through bodily penance.
"We would hear it – we were in the next room at Castel Gandolfo. You could hear the sound of the blows when he flagellate himself. He did it when he was still capable of moving on his own."
The flagellation is also confirmed by another bishop who has given testimony. Emery Kabongo was a secretary for Pope John Paul.
"He would punish himself and in particular just before he ordained bishops and priests," he said.
"I never actually saw it myself but several people told me about it."
Self flagellation is sometimes used by devoted Catholics as it reminds them of the whipping endured by Christ at the hands of the Romans before he was crucified.
It is still common in the Philippines and Latin America, some members of strict monastic orders and some members of the lay organisation Opus Dei – who feature in the Dan Brown blockbuster The Da Vinci Code.
In the film – which was condemned by the Vatican – murderous Albino monk Silas, who is a member of Opus Dei is seen in a brutal scene whipping his back and drawing blood as he prays on his knees.
A Vatican spokesman said: "The investigation and documentation is still secret and as such we can make no comment on it until the final report is published.
"I know that the nun in question has returned to Poland and she would have spoken with the Congregation as she was with an order that worked in the apartments of Pope John Paul."
The Congregation for the Causes of Saints has been investigating the case for Pope John Paul since he died and has approved the late pope's "heroic virtues" and the paperwork has been sent to his German successor.
The late Polish pope's beatification is expected to take place sometime next year, perhaps in April, to coincide with the fifth anniversary of his death or in October to coincide with his election in 1978.