Yoga is by and far the best way to improve your flexibility. Not only does it do that, but I find that it improves your concentration, your overall understanding of what your body can and cannot do as well as improved breathing techniques in tight situations. We start every single BJJ class with yoga as a warm up! I find other than the flexibility, the greatest advantage to this is the breathing techniques and concentration it takes to do the stretches and hold them while taking slow deep breaths. This helps you to relax, slow down your heart rate, not panic and get air to your lungs when your body is put in all kinds of uncomfortable positions. This help significantly with your submission defense.
So if you want to just improve your flexibility, stretch. If you want to improve your flexibility, submission defense and concentration, then do yoga. You should maybe consider switching to a gym that incorporates yoga with BJJ and judo.