Unexplained rapid weight gain, bloating in stomach and legs. What could this be from? Please help

Many things. The bloating in belly and legs could be related to excess fluid. Excess fluid could be related to liver, kidney or heart problem. Hormone disorders can lead to rapid weight gain and include thyroid or adrenal issues. As you can see there are many causes of rapid weight gain.These are just a few. I strongly suggest you discuss the weight gain with your doctor so that he/she can figure out the cause.