When Frodo, Sam, and Gollum/Smeagol are going through the Dead Marshes on the way to Mordor, Sam notices that the waters around them are filled with dead bodies that seem to attract those who look at them (e.g. Frodo). Gollum then says:
"You cannot reach them, you cannot touch them. We tried once, yes, precious. I tried once; but you cannot reach them. Only shapes to see, perhaps, not to touch. No precious! All dead."
TLOTR Book 4 Chapter 2: The Passage of the Marshes
Next there's this:
Sam looked darkly at him and shuddered again, thinking that he guessed why Smeagol had tried to touch them.
But nothing more is explained, and I haven't a clue what Sam guessed.
Why did Smeagol try to touch the dead bodies?