Welcome to the forums!!!
Brazilian jiu jitsu with tight hamstrings – how long have you played? I agree you’ll do better with more mobility there. Maybe also in hips and shoulders depending on where you are now – would give you more room to receive a joint lock than your opponent expects. I’ve also heard that yoga can decrease a body’s required recovery time.
While on the yoga mat, honor your limitations and learn from them. Do not hurt yourself – it really can happen, and competitors and fighters can be tempted to disregard that. Will you be exploring yoga with a teacher? I highly recommend it.
A good stretch inspired by yoga would be –
stand with your weight well balanced. bend in the knees and the hips to bring your belly flat onto your thighs and your hands to the floor. watch your breath. as it becomes even and nourishing, press your feet (whole feet) into the floor and lift your hips a little bit into the air. keep your belly on your thighs – that’s the first thing. keep your hands on the floor – that’s the second thing. your third thing is to press your sitting bones (ishium, bottoms of the pelvic ring) into the air and away from the floor. find a good lovely stretch along the entire back of your legs – don’t let the stretch localize (only high or only near your knees.) keep breathing. as long as your hamstrings are happy about the arrangement and the newfound opportunity for length, stay there and remain curious about the stretch. when your hamstrings get bored or tired, release. find a stretch for your quads and an arch for your spine to counterbalance. become curious about how your body feels different after you’ve done this.
A few private lessons with a teacher could be the best way for you to start off – you probably have a different balance of mobility, strength, and weakness than the average folks who pick up yoga. Private lessons would help you anticipate what, if anything, will be odd for you in a group class setting.