If confession is not available for a time, then you can still have all your mortal sins forgiven by making a perfect act of contrition. If you die during sleep (O please don’t do that!), you will still go to heaven.
However, the obligation to confess your sins remains, and you should confess your sins as soon as a priest becomes available, even when you know that those mortal sins have already been forgiven when you made your perfect act of contrition. You only need to confess all your mortal sins since your last good confession.
Meanwhile, if you have a mortal sin to confess, you should refrain from receiving sacramental communion as long as you are still waiting to confess your sins to a priest.
You can always make an act of spiritual communion if you cannot receive sacramental communion. You don’t have to fast an hour, but you still need to say your prayers before communion and thanksgiving prayers after communion.
Here is the ACT OF CONTRITION:
O my God, I am heartily sorry for having offended You. And I detest all my sins because I dread the loss of heaven and the pains of hell. But most of all, because I offended You, my God, who are all good and deserving of all my love. I firmly resolve, with the help of your grace, to confess my sins, to do penance, and to amend my life. Amen.
And here is the ACT of SPIRITUAL COMMUNION:
My Jesus,
I believe that You
are present in the Most Holy Sacrament.
I love You above all things,
and I desire to receive You into my soul.
Since I cannot at this moment
receive You sacramentally,
come at least spiritually into my heart. I embrace You as if You were already there and unite myself wholly to You. Never permit me to be separated from You.
Amen.
I hope that helps.