Of course Anakin knows how to become one with the Force. He was conceived by the Force. He's the friggin' ONE. If the ONE wouldn't know how to become one with the Force, I don't see how someone else could.
Or maybe he quieted his mind before he died and some midichlorians told him. I'm sure it's something like that.