yes thanks for the replies.
Garlic is not due for planting till late march but I was planning on planting the cowpea shortly (in the next month) as the beds are ready and will start filling up with weeds shortly. As you said, I can trim back the cowpea when I plant the garlic as required. I have grown cowpea before and it is a very good weed suppressor.
Here is the link to the info about Alliums affecting legumes -
https://luv2garden.com/leeks_companions.html
but it appears they are not considered good companions due to the affects of the Alliums (garlic) on the legume and not the other way around.