Weight gain

I'm freaking out a bit so any input would be greatly appreciated! I'm only 26 weeks and already gained 40 pounds! I feel like a lot of it is water weight, because I'm a teacher I stand all day and by the time I get home my ankles and feet are extremely swollen, my appointments are also at the end of the day. My doctor also told me today 2nd babies are typically larger than first babies, my first baby was almost 9 pounds so extremely worried I'm going to have a 12 pound baby. I'm now on a diabetic diet to try and prevent the baby from getting too big just worried the next three months are going to be awful.