It is most likely fluid retention.
The squash and the fruit that you had would have provided fibre that needs a generous amount of water in order to go through your system properly. In order to have gained 5 pounds in one night, you would have had to have eaten over 15 thousand extra calories than you needed (that's about 15 large meals from McDonald's).
Yes, water seems like the culprit. Or it could be something else which wasn't put into the toilet.