Hi Nate.
Recovery is based on refueling and recovery and resting... recovery is easier if you fueled throughout the event.
Generally after something big like 31 miles (with plenty of mid hike fueling, carbs and electrolytes) I come home and drink a big glass of chocolate milk... protein and simple sugars, then I'll stretch a little, Ice (ice packs or ice bucket. whatever I need then shower... eat something like rice chicken salad... for the overnight and should be good in morning.
Our bodies are like an old messed up glitchy 020 and you have to learn the unique tricks to keep it going.
Then there is just muscle destruction... that takes a few days to recover from... I'm thinking the 31 miles isn't the norm.. so your body was like hey big guy... whoa.