rice absorbs moisture.
Curious if this works to recover notebooks or other electronics.
To a degree, yes, but don't expect magic. Some laptops have a waterproof membrane under the keyboard, so if you're lucky, and it does, you may be able to just pop the keys off and dry the membrane out, and make sure no liquid creeps round the side into the electronics.
Otherwise you may have better odds if you open up the case and mop up any/all loose liquid you can get to with a microfibre cloth, as soon as possible, then try and let it air dry for a while.
A sealed bag with dried rice and your electronic object may absorb a bit of leftover moisture, but only to the extent that it will equal the moisture level in the sealed bag - the dried rice will gain a little extra moisture, the object will lose that bit of extra moisture.
Try to resist the urge to turn it on to check if it's working until you've got all the moisture out.