"The softness of the earth had given him an idea."
"Then, with sweating and aching with tiredness, he crunched behind the stump of a lighting-charred tree."
Rainsford was fighting for his survival and doing that made him very tired and he needed rest, so he slept at the tree. He was scared of the general being able to find him but he knew that if the general had found him he would've had to have some weird way of knowing where he was. This rest brought rainsford new confidence in what he was doing.
Even though we don't know for sure that he had past experience with getting out of the sand, we do know that he wouldn't have known all of the techniques he used to get out. Therefor, he used his reasoning and maybe past experience.
Rainsfors had one every fight so far with the Zaroff, and the Burmese tiger pit had him feeling so tired and exhausted. If he wanted to win more he should rest but more fights are to come.
"He thought of a native trick he learned in Uganda. He slid down the tree. He caught hold of a springy young sapling and to it he fastened his hunting knife; with the blade pointing down the trail."
If Rainsford didn't remember what he learned from Uganda, he could've possibly died and then Zaroff would've continued his murders.