One thing you can count on with a medical situation in the backcountry - help is likely to take a LOT longer to arrive then you think. So, in managing a medical emergency, one important factor is to be sure your patient is as dry, warm, and comfortable as possible.
In addition to basic patient comfort, this is also a good treatment for hypothermia. (If you're doing this just warm someone up, you probably don't need the rope wrap as shown in the video.)
If treating for hypothermia, the patient's clothing should be removed if it's wet, and ideally replaced with dry clothing.
As a good rule of thumb in wilderness medicine, you should use the patient’s gear when possible. (If your patient is going to be evacuated by any sort of ground rescue or helicopter, the chances of you ever seeing that equipment again are probably pretty low, so keep that in mind when you offer your sleeping bag. =^)
Here's a nice article from the American Alpine Institute blog that discusses this technique. Direct quote and image from the article:
Lay out a tarp on the ground.
Place 1 or 2 pads down on top of the tarp. Two pads are always better than one.
Stack three sleeping bags on top of the pads.
Place the victim inside the sleeping bag in the middle.
Wrap the victim in the tarp.
Provide the victim with hot water bottles. These should be placed under the arms and at the crotch. Additional bottles may be held or placed at the victim's feet.
And, here's a video that discusses basically the same technique, with the addition of creating a daisy chained climbing rope around the patient. If you think you may have to transport your patient, this could be a nice feature to have.
Note the addition of trekking poles underneath the patient, this can give some rigidity to the rope litter if you need to carry it.
And finally, here’s a longer video from the excellent WildMed youtube channel, where they call it a “Cocoon Wrap”. They describe in detail a few extra components, such as the importance of padding, ways to keep the patient dry, and how to lay out the rope.