what side are you falling off?
make sure you jump straight on. a lot of people fall off because they jump slightly to one side or the other. if you're falling forward, then its cuz ur jumping (to your left when facing the rail, forward when you're on it, either way you hopefully get what way im talking about) a little. try to jump as straight as you can, and if you still cant seem to get it, try to jump on and grab you're front foot inside edge (like you're going to front 2 off). that's what i do if i feel like im slipping off as well as adjusting my upper body. basically you're just gripping the rail, and it should make it so you land facing forward.