Diet drinks sometimes contain caffeine and sodium, both of which may cause a degree of fluid retention. Probably not severe unless you drink gallons I suppose.
Sometimes, hydro-static pressure in the kidneys may not be high enough during the day to produce urine, especially if movement is difficult. Water will pool in the feet and ankles even if it's not enough to see, tissues can hold 15% more fluid without it being visible. When one lies down at night, the pressure equalises, undoing the pooling, and the kidneys function as they should.
At least that's what I've been told happens to me because I can sometimes be up every hour, on the hour and sometimes just a couple of time for the whole night. I think the thing with the mattress may be related to the kidneys "having the night off" when not using the mattress. In my case my GP tells me that I have to take into account Lisinopril, Amlodopine and Doxazosin. All of which affect fluid retention. Just googled side effects of all three, which I hadn't!