Compared to my Subarus, the 4Runner is pretty awkward in snow or mud, LOL.
Jeremy is of course right. Activate whatever you may need before you need it. And never the locker while wheels are spinning.
If the terrain is 4H and there is any sand, I ALWAYS keep the MTS at sand which is the only function that works in 4H.
If the terrain is 4L, then I normally use whatever MTS function I like for the given terrain, with the sand one as default.
If I have to deal with mud, which I avoid so I have done very little in the 4R, nothing like the 40-miles of Utah mud in a Subaru, I would do 2nd gear, selected manually with MTS.
In snow, I would not touch the locker given how sophisticated MTS is and the tendency of lockers to make the vehicle slide in snow. The 4R does very well indeed in trail snow though it is a joke vs a Subaru in urban snow.
I have done some questionable stuff solo, but generally, since we are almost exclusively solo, I simply don't go out when there is danger of serious mud. Mud is not hard to avoid in the SW!
Not that you asked, but before any seriously loose rocky spot, be in 4L and have the locker early so it can engage before you get to the spot. In 4H, the 4R has a very nasty tendency to move abruptly sideways on you, which was very unnerving the first time it happened to me (a Subaru would just spin in place when it cannot proceed, while the 4R moves sideways pretty nastily if not using the traction aids). The MTS function for rock is amazing. I only use the locker when I feel I need maximum control in rocks, mostly on tight spots between rocks.