If you can figure out where you are meant to be (by laying on the board on the beach or in calm water), then draw a line in your wax or use a different coloured wax (or even draw a marker pen line on your board) to give you a visual cue.
I have a line drawn across my board in the wax (just use a pencil or your fingernail) that is where I should place my hands in order to pop up in the right spot, so when sitting on the board and turning I can put my hands in the right place straight away. Actually I dont really need this anymore because I can now feel whether I am balanced, but there is no disadvantage to it. Also, if I am perling but laying on the board properly, I know its not because of my positioning.
Of course, for different waves there might be slight differences in positioning, so its not an exact science.
For you with a longitudial problem, if you have a central stringer (running down the middle of the board), then make sure your chin or the middle of your rib cage is in line; and if you dont have a stringer then draw a line down the middle of the board.
If your problem is tilting after popping up, draw a board in the sand on the beach and draw a line down the middle. Then do a pop up and see where your feel have landed. You might just be popping up to one side. I suspect some people have one are stronger than the other (eg from playing tennis or something) and this pushes them too far to the opposite side (for example, if you have a strong right arm then when you pop up your right arm pushes you too far to the left).
Another possibility: you have both hands on the same side of the board after popping up (both hands are in front of you). After you pop up, your leading hand should be on the heel side of your board. So if a natural footer, with your left foot in front, your left hand should be on/outside the left side of your board, which is 'behind you', not sticking out in front of your face. If you have both hands in front of you, its a recipie for tipping over.
If this sounds like you, I highly recommend spending 5 minutes watching this video