IIRC, William F Buckley had a piano built into his (not so huge) cruising ketch. I'm not sure if he was able to play Bach on his races to Bermuda, or if he had to wait until mooring for the evening.
This is from the tribute to Buckley in the Fishing Bay Yacht Club newsletter:
"A Renaissance man and accomplished musician as well, he provided Cyrano, his 60-foot ketch, a piano which he played for his personal enjoyment and, presumably, for that of his crew during his 4,400 mile voyage to Spain as recounted in Airborne.
"...the evening was so pleasant," Buckley wrote, "the late afternoon sail so exquisite, the sun sight so perfect, the wind so regular (temperature just right), I played the piano a bit before dinner. Not easy," Buckley continues, "because when the boat rocks I need to exert great pressure through my knees on the underside of the keyboard to keep from falling over backward, and the additional challenge to coordination is enough to make the sounds that result a travesty on the Bach partita I am, as usual, struggling with. I left the piano and put on the cassette player, a late Beethoven sonata, as we sat down for a dinner of turkey and stuffing, wine, cheese, fruit and coffee. I thought I would try -- just a flyer -- to say something about the difference between the late and the early Beethoven...."