The layout is a spectacular looking trick, and fortunately, it's not as hard as it seems. The main goal is to get past the fear of some potentially painful crashes since you open up your torso to impact.
Make a hard cut to the wake. When you approach the wake, maintain your edge, applying most of your weight on the back corner of the board. Imagine as if you are trying to cut away from the boat. This will give you such tremendous line load that, when you launch into the air, your arms will get pulled straight. Now let the board fall back behind you and keep your head up. Look at the top of the tower on the boat or at the horizon if you don't have a tower. Once you are in the layout position, the line load will act like a bungee cord and help you spring the board back under yourself. For a good landing, pull the handle to your waist and hold it there with all of your might. You will most likely get a tremendous second bounce that will pull you out the front if you don't have your arms in. This bounce can be reduced by landing slightly on edge or you can use it to do an air somersault. Go for it!
I rotate in the air and land on my side.
You're forcing the layout. Just let the board fall back and let your arms extend out. Or...
You're throwing the trick at the boat. When you are in the air, maintain the same direction as when you were cutting. The tightening of the rope will pull you parallel with the boat. If you try to throw the trick parallel with the boat, you'll rotate and crash. Or...
You're allowing the board to flatten out before you hit the wake. Maintain an edge through the wake.
I can do the layout, but I get pulled out the front after landing. Keep the handle to your waist. A bunch of arm curls or chin-ups may be necessary to build your strength.
The next step: Layouts create a huge second pop. Try throwing in an air trick after the landing. A front somersault is usually the easiest.