I guess The Master has a "happy ending" showing the blurring of the borders between protagonist and antagonist, good and evil. In the end we're all just men (or women). We do what we used to do, make ourselves happy, and hope this isn't our only life.
Here is a good theory by some member in a forum:
When he is having sex and brings up Dodd’s practice, he seems to be trying to hypnotize himself, which brings us to one of the earlier shots of him caressing the sand-lady. He was happy, free, and at peace in that moment when Dodd woke him up from the hypnosis. He is trying to recall that ecstasy, but never will be able to again. His life only had purpose with Dodd, yet he refuses to surrender all of his dignity to be with him.
Freddie was indebted to Dodd for showing his life as something brave and wonderful, and Freddie stayed despite all the mind games and ego-tripping. But when he walks through the ominous halls of Dodd’s now successful legion of loons, it occurs to him he will always come second, and in the presence of others be an artifact of Dodd’s brilliant insights.
In short: Freddie left.
David Thomson is the author of The Big Screen: The Story of the Movies (Farrar, Straus and Giroux). An article appeared in the October 4, 2012 issue of the magazine. He wrote there:
There is an ending that, if you wish, you can call enigmatic or mysterious, or just a helpless way of drawing the attenuated proceedings to a close.
Another review shares a good point of the movie with us:
Right from the beginning, Dodd pegs Freddie all wrong. He calls Freddie a “hopelessly inquisitive man,” except he is nothing of the sort. Freddie doesn’t need a master to live his life. All he needs is a beach he can draw a naked woman on and cuddle up next to. Dodd – whether because he seeks so aggressively to become one or because he genuinely needs one himself – can’t understand a Master-less existence.
As chaotic as Freddie’s state of mind is, he has this life figured out. Dodd is the lost one who needs guidance. The final minutes show the cult leader will always wear an artificial mask, while Freddie will continue on his childlike and comfy routine, never having to hide who he is.
However I could not find any interpretation by the director of the ending anywhere. Anyways this is a good reference to many good critics on the movie.