Usually, weight gain (even when 'unexplained') is considered far less serious than unexplained weight loss.
I hope you won't be offended, but is it at all possible that your mum has developed light fingers towards other resident's food? Particularly in the case of high-calorie, easily pilfered foods like biscuits or sweets? Dementia often results in loss of inhibition so this is a possibility.
If your mum is sedentary this will not help. Also, it appears that elder persons seem to require less calories than younger, and are thus inclined to gain weight. It may be because they have a loss of lean muscle mass (this is normal and happens to everyone unless extra exercise is undertaken to compensate), lean muscles burn calories even when one is at rest. If you have bigger muscles, they burn more calories all the time.