In 1974, Robert Nozick, a precocious young philosopher at Harvard, scooped “The Matrix”:
"Suppose there were an experience machine that would give you any experience you desired. Super-duper neuropsychologists could stimulate your brain so that you would think and feel you were writing a great novel, or making a friend, or reading an interesting book. All the time you would be floating in a tank, with electrodes attached to your brain. Should you plug into this machine for life, preprogramming your life experiences? [...] Of course, while in the tank you won’t know that you’re there; you’ll think that it’s all actually happening [...] Would you plug in?"
Nozick’s thought experiment — or the movie, for that matter — points to an interesting hypothesis: Happiness is not a state of mind.
“What is happiness?” is one of those strange questions philosophers ask, and it’s hard to answer. Philosophy, as a discipline, doesn’t agree about it. Philosophers are a contentious, disagreeable lot by nature and training. But the question’s hard because of a problematic prejudice about what kind of thing happiness is.Sosa concludes that hooking oneself to the machine would not make one happy and that he doesn't think it should be done. For my part, I don't think he makes a persuasive case, but read his argument at the link and see what you think.
In my opinion, refusing to be connected to the machine only makes sense given a theistic worldview which includes immortality. If there's no life after death then I can see no reason why one shouldn't allow oneself whatever pleasures, no matter how existentially empty, one can glean from the time we are here. In a world in which materialism and naturalism are true, connecting to the machine makes perfect sense. At least to me.