It began as an acting exercise, submerging himself in his persona of Sam, devoted gardener and friend of friends. It wasn't natural for him- he was an actor after all and possessed of an ego- but there was unexpected euphoria in giving himself over completely, not only to Frodo but to Elijah. He loved attending to Elijah's needs: he might be Sam, triumphantly pulling some small item from his backpack that Mr. Frodo had forgotten.
The lines started to blur, merge; attending became necessary as breathing, euphoria found in a shattering climax and even more shattering realization.
He was Sam.