There are two stretches you can do, but before you do, there's a few things you should not do, which often get over looked when explaining stretches.
-Do not stretch cold muscles. Stretching after exercise is preferable.
-Do not pull the horse past the point of resistance. When stretching, you'll notice there's a point where it become difficult or sticky.
-Be careful of your hands and back when stretching as it's heavy lifting. Lift with your legs and give yourself a strong base with your feet. This means you're less likely to fall over, less likely to damage your back and are more likely to be able to move if the horse kicks.
-Do both sides
So there are two main stretches for the hindlegs that you can do at home.
1) Forward stretch: the forward stretch involves picking up the leg as normal. You hook the horses toe with the hand closest to the horse (you can use your other hand to support the fetlock if it's a heavy foot), and bring the leg towards the fetlock of the front leg.
2) Backwards stretch: you can go from the forward stretch into the backwards stretch. With the arm closest to the horse, hook around the inside of the leg to the front of the fetlock, and place your hand on the fetlock. Walk forward with the leg until you are parallel with the hip and then push the leg back with your arm. Some very flexible horses can go further back again, but for the beginning at least, just a push from the hip should be enough.
There are other stretches too, but if you're not used to stretching and feeling a horse, they can do more damage than good and so are not recommended to do at home.