The idiom, whatever floats your boat, could refer to the American slang, floating, meaning high or intoxicated by drugs. The term “whatever” also hints that the speaker is indifferent to the outcome or choice about to be made.
The following extract is from the website businessballs.com, run by Alan Chapman.
Although copied ad verbatim, I chose to break the following article into several paragraphs to facilitate the reader. Any emphasis in bold are mine.
whatever floats your boat - if it makes you happy/it's your decision/it's your choice (although I don't necessarily agree and I don't care anyway) - a relatively modern expression from the late 20th century with strangely little known origins.
Interestingly the phrase is used not only in the 2nd person (you/your) sense; "Whatever floats your boat" would also far more commonly be used in referring to the 3rd person (him/his/her/their) than "Whatever floats his boat" or Whatever floats her/their boat", which do not occur in common usage. Importantly the meaning also suggests bemusement or disagreement on the part of whoever makes the comment; rather like saying "it's not something I would do or choose myself, but if that's what you want then go ahead, just so long as you don't want my approval".
Unofficial references and opinions about the 'whatever floats your boat' cliche seem to agree the origins are American, but other than that we are left to speculate how the expression might have developed.
The 'whatever floats your boat' expression is a metaphor that alludes to the person being the boat, and the person's choice (of activity, option, particularly related to lifestyle) being what the boat sits on and supports it, or in a more mystical sense, whatever enables the boat to defy the downward pull of gravity. In this latter sense the word 'floats' is being applied to the boat rather than what it sits on.
Whether the phrase started from a single (but as yet unidentified) quote, or just 'grew' through general adoption, the clues to the root origins of the expression probably lie more than anything else in the sense that the person's choice is considered irresponsible or is not approved of, because this sense connects to other negative meanings of 'float' words used in slang. The word 'float' in this expression possibly draws upon meanings within other earlier slang uses of the word 'float', notably 'float around' meaning to to occupy oneself circulating among others without any particular purpose ('loaf around aimlessly' as Cassell puts it, perhaps derived from the same expression used in the Royal Air Force from the 1930s to describe the act of flying irresponsibly and aimlessly).
Also, significantly, 'floating' has since the 1950s been slang for being drunk or high on drugs. 'Floating one' refers to passing a dud cheque or entering into a debt with no means of repaying it (also originally from the armed forces, c.1930s according to Cassells). And a 'floater' has for some decades referred to someone who drifts aimlessly between jobs. While none of these usages provides precise origins for the 'floats your boat' expression, they do perhaps suggest why the word 'float' fits aptly with a central part of the expression's meaning, especially the references to drink and drugs, from which the word boat and the combination of float and boat would naturally have developed or been associated.
From The Routledge Dictionary of Modern American Slang
2 drunk or marijuana-intoxicated US, 1938 “Man, when I see you floating, that'll be the day I quit. That'll be all. See old preacher Kipper floating!”
— Edwin Gilbert, The Hot and the Cool, 1953
TIME Monday, July 19, 1943
... the viper [client] says, “Gimme an ace” (meaning one reefer), “a deuce” (meaning two), or “a deck” (meaning a large number). The viper may then quietly “blast the weed” (smoke). Two or three long puffs usually suffice after a while to produce a light jag. The smoker is then said to be “high” or “floating.”
Here is a Google Ngram showing only the trend for floats your boat between 1920 and 2000
The earliest instance, recorded in 1933, has: the river rises once again and floats your boat away.
In the quagmire, I did not find any trace of the Oxford English Dictionary's citation, 1981, which Wordwizard listed. It's unlucky there is no digital version of that copy of the Sunday Herald (Chicago). However, the two earliest instances I did find online, with its current meaning, are dated 1985
Further, summary or statistical information is difficult to obtain in either English or Spanish.1' And if that floats your boat, you can have it for $30 a year (12 issues) paid to ...
They often seem to advance relativistlc [?] arguments — "what ever floats your boat" — or are nihilist in the sense of admitting to no knowable moral scheme. Their ethics seem to be more individuated. Of course the forgoing [sic] are exaggerated ...
Who "they" are, I do not know, but it is revealing that the idiom in its entirety appears in connection with no moral scheme, and ethics.