It depends on the study. People are allowed to volunteer, but it's a bit more difficult for Veterans Affairs. They work more like an insurance company, so the information is really private. In the military, if you want to have access to people with a particular diagnosis, you'd typically go in through the health system.
If you want to access patients in the military, the approval has to come from the Surgeon General in every case. So the study has to have scientific rigour. It has to have merit. It has to be of interest to the military. Then they will put out a request and subjects can volunteer.
It's as you would do with any study. If I wanted to go to my local hospital and recruit patients who had knee pain, it would be on a volunteer basis.