Some dynamic stretching as part of your pre-game warm-up is a good idea. You can also include some progressive shadow strokes (slow & easy at first, gradually increasing speed) and some footwork patterns. Rope skippng and other interval routines can be employed.
If you want to do a bit of light static stretching, do this 30 minutes or so before competition. If you feel that you need more extensive static stretching, then perform this 60 minutes or more before your match start times. This will allow enough time for your muscles (& joints) to recover to full power production levels. After the static stretching and before your match be sure to perform your dynamic warm-up.
The thing that helped me the most was to get my body loose and pumped up with some extended cardio exercise. I would try to get in at least 10-20 minutes of low-impact aerobic exercise followed by another 10 minutes of interval work. Usually, the more aerobic and interval work I could get in just prior to heading out to the court, the easier it was for me to get my footwork & strokes working for me in the match. The pre-game cardio routine really got my muscles relaxed, my heart pumping and my adrenaline & endorphins flowing. It really kicked my body's energy systems into more efficient modes of production.