My theory on why certain foods help lucid dreaming is this:
Foods that are not digested entirely or cause a certain degree of upset i.e Lactose foods (Milk, Chocolate, Ice cream) keep the mind/body connection open longer and thus there is a higher degree of consciousness because the body is slightly irritated (kept awake). So all those foods (Pickles, Raw Liver,ect) would , if taken before bed undoubtedly lead to digestion upset and keep the mind/body connection on longer then usual. That's my theory.