Hopefully you now have completed the marathon. Whether it be two hours or six hours, it's a great achievement. That includes those who walked the complete route. Be proud of what you achieved, and if you broke your personal best, even better.
The legs, the calves and the hips are probably stiff and tender. It's time now to give the body a chance, and time, to recover.
Research has shown that the recovery time is up to two weeks after a marathon. The muscles of the legs and calves can be inflamed, with loss of muscle power and durability. The minimum time is seven days to recover as the immune system is suppressed, which can often increase the symptoms of flu, colds and pains in the joints etc.
So give your body a chance to repair. When you cross the finish line it's important to wrap up well, put on some warm dry clothes as quickly as possible to avoid getting a chill. It won't help with the stiffness and soreness but at least you will be warm.
If you have access to a bath try and have a cold bath for a least 10 minutes. Just gradually lowering yourself into the cold water. Or start off with luke warm and add cold water slowly. Anything lower then 65 degrees will do.
If you are feeling brave, have an ice bath. Some athletes use a barrel filled with ice water and stay in it for 10 minutes. This will definitely loosen your legs and hips. As it will increase circulation quickly for aided recovery.
After your bath just keep moving around to keep the circulation flowing.