the saying can be attributed to the first world war.
when in the trenches we used to play jokes on each other when really hungry. you had to be there, but sometimes a piece of the enemies brains would feel wet to the touch...causing some of us to exclaim.......oooooh I bet that feels like cabbage!
Jay90 you must be getting confused because of your age.
If you are 90 you were born in 1918 = the year WW1 finished so you could not have been in the trenches.