This paper studies an infinite time horizon LQR optimal control problem for a system describing, within a linear approximation, the vertical oscillations of a floating solid, coupled with the motion of the free boundary fluid on which it floats. The fluid flow is described by a viscous version of the linearized Saint-Venant equations (shallow water regime). The major difficulty we face is that the domain occupied by the fluid is unbounded so that the system is not exponentially stable. This raises challenges in proving the wellposedness, requiring the combined use of analytic semigroup theory and an interpolation technique. The main contribution of this paper is that, in spite of the lack of exponential stabilizability, we could define a wellposed LQR problem for which a Riccati-based approach to design feedback controls can be implemented.