To be in a restricted environment with water and Epsom salts gives the choice to let go. Nobody to talk to, problems to solve, things to look at it is just your natural self. You may not consciously sleep and your mind may chatter but your body will be resting which makes all the difference.
The floating effect is physiological, your body will respond even if your brain and mind are anxious. The relaxation is automatic, it is an evolved response to floating, common to all humans, it will work even if your brain remains active in the float session.
Some insomniacs sleep from their first float whilst others just learning to let go.