There is only one place designated for visitors inside the walls of the Vatican, the Domus Sanctae Marthae (Casa Santa Marta). But its purpose is to lodge
ecclesiastical personnel serving at the Secretariat of State and, as far as possible, at other Dicasteries of the Roman Curia, as well as to cardinals and bishops visiting Vatican City to see the Pope or to participate in events and meetings organized by the Holy See. EWTN
and in particular, the cardinal electors during a papal conclave. In other words, being invited to stay here as a lay person not on official business would be something extraordinary. You might petition your prelate to recommend you for an invitation, but I think receiving one would be akin to receiving an invitation to stay at Buckingham Palace or the Blair House.
There are various options very close to the Vatican, but there will be tradeoffs. There are a couple of accessible full-service hotels like the Residenza Paolo VI and the Palazzo Cardinal Cesi within a block or two of St. Peter's Square, but prices seem to be high.
As pilgrims, you may prefer a guesthouse operated by a religious order (mostly convents), of which there are many in the city. The website Good Night & God Bless, after the guidebook of the same name, includes selected recommendations for convent stays. A more complete and up-to-date website to check would be Hospites.it, though the English content is sparse. But to make arrangements directly, you'll probably need someone who speaks Italian, so a site like Monastery Stays or Booking Monastery might be well worth the booking fee.
Another tradeoff is that these are not hotels. The accommodations are simple, and the establishments offer limited services. They mostly impose curfews and early checkouts. The staff you meet may only speak Italian. They may not be accessible for the mobility-impaired. And naturally, the closer the amenities one is to that of a hotel or inn, the closer in price to a hotel or inn you may expect to pay.
The extraterritorial properties of the Vatican are mostly individual buildings, and I do not believe it is possible for a tourist to stay overnight in any of them.