:
Different food items are believed to be harmful and beneficial in the various Indian communities. Some beliefs are often associated with the concepts of ‘hot’ and ‘cold’ foods. In Indian communities food items perceived as ‘hot’ are often believed to be harmful for pregnant women and those perceived as ‘cold’ believed to be beneficial, although in a few communities effects are believed to vary in different stages of pregnancy and also on individual physical constitution.
Some ‘hot’ food items are meat, egg, fish, onions, garlic, papaya, pineapple, mango, black berry, suran and so on. The general concept of avoiding these food items was that they caused premature delivery, miscarriage, or abortion.
Some of the ‘cold’ food items are custard apple, coriander, coconut water, peas, radish, yogurt and so on. Some of these ‘hot’ and ‘cold’ food items are believed to be hot in one state and as cold in other state of India. .
Mind you I don't think these beliefs are backed by modern science..but it could be where the myth came from.