I usually relax my fingers by stretching them a bit. Just be careful not to do stupid stretches that could cripple your hand. When talking about middle, ring and small finger, you don't want to stretch one of those without stretching the others at the same time in a similar way, Robert Schumann can attest to that. If you stretch all your fingers (bar perhaps the thump) of one hand at the same time and in the same way, you should have nothing to worry about. After stretching, wait a few minutes and you should be good to go again.
Other than that, you can always try and train your fingers to become stronger. This won't directly help you relax but it will help you to not get tired in the first place.