It shouldn't make a huge difference, you may still have a higher quality RAW file than jpg, and in those cases you would be able to create a tighter, more accurate mask.
But mostly I'd say that you could accomplish similar results with the JPG as you could with a RAW with masking.
It also depends on how degraded the jpg becomes. Each time you open and save more data is thrown out. When possible it is always better to work with a format that is lossless.
But on a first generation jpg you shouldn't see much difference if at all when creating a mask.