IMMEDIATELY FOLLOWING THE RACE
For short races like a vertical kilometer or a 10-20 km trail race, where we go hard and maybe accumulate some lactic acid, it's nice to do a short cooldown after the race and some stretching.
After longer races like a marathon or even an ultra-marathon, of course we don't want to cool down and there is no benefit with it either. I don't think there is any benefit in stretching right after an ultra-marathon either. The body is too sore for that. The days after the recovery will be quicker with light activity. Don't run, but go for some easy swimming, biking or hiking just for circulation. When the muscles are warm, it's also good to get in some yoga and stretching.
Get dry and warm as quickly as possible. After any race, this is important because when the body is depleted it's really easy to catch a cold. Also try to eat something as soon as possible after the race. Sometimes that can be really difficult, but just something small will help the process of starting to repair the body.
LATER THAT DAY
Take a cold bath for the legs. This will help to increase the blood circulation to the muscles and the recovery. I also think it feels very nice when the legs are aching to cool them down. Try to stay in a cold river, lake or ice bath for 10 minutes. The bonus is if you also are in a place with a sauna. I love mixing the intense heat with the cold baths.
A massage always helps, too. If you can get a massage, that’s great for recovery. Otherwise you can massage some sore parts on your own—like the calves, feet and quads. You can also use a foam roller or small ball, like a baseball or lacrosse ball, to massage sore spots.
THE DAYS AFTER YOUR RACE
Don’t rush back into training. In the days after the race, relax and do things other than running that you enjoy. It's better to take an extra day off than to start training too early when the body is not ready for it yet.
Mental Recovery is important, too. I think this gets overlooked, but after a big race and challenge that you have been training and looking forward to for a long time, it can feel a little empty when it's over. It's fine to feel that way. Sooner or later you will find motivation for another race or goal.
HOW YOGA HELPS
I practice yoga regularly and find it to be a great tool for recovery since it synchronizes breathing and stretching. It’s difficult to recommend specific stretches or yoga poses because it depends on where you are sore and it’s also not very comfortable to do a yoga pose if you never otherwise practice yoga. But it’s a great tool if you practice it.