It's amazing how much water weighs! A gallon of water weighs 8 pounds, and a pint of water (16 ounces) weighs 1 pound (in metric, 1 liter of water weighs 1 kilogram). This means that if you drink a 1-liter bottle of soda, you instantly gain 1 kilogram (2.2 pounds) from the water. That's a big weight change, and it can happen very quickly.
The main thing affecting overnight weight change is the amount of water in your system. Water weighs an amazing amount. In other words, if you drink a 1-liter bottle of soda, instantly you will gain 2.2 pounds, just from the water.
Overnight, two processes cause you to lose water gradually: breathing and sweating. In respiration, each time you exhale, you lose a small amount of water. If you exhale onto a cool piece of glass you will see this moisture. Through sweating, also called transpiration, you lose water through the skin. Over the course of one night, both of these processes eliminate more water than you might think.
Also contributing to the weight loss is the tradition of using the toilet prior to the morning weigh-in. That process alone can eliminate up to a pound of water. The average person eliminates about 1.2 liters of water just in urine every day. Another liter a day is eliminated through perspiration and respiration. That's 2.2 kilograms (or almost 5 pounds) throughout the day.