Cowpeas are grown mostly for their edible beans, although the leaves, green seeds and pods can also be consumed, meaning the cowpea can be used as a food source before the dried peas are harvested. Like other legumes, cowpeas are cooked to make them edible, usually by boiling.