The proper tilt depends on how high the keyboard is relative to your shoulder height (affected by the height of your desk, your chair (if you’re sitting), and how tall you are).
You want your wrists to be in as straight and neutral a position as they can be, not bending up or down.
The overall most comfortable position, least likely to cause injury, is a slight negative tilt (with the side of the keyboard away from the body slightly below the near side). That is, with your elbows bent at a slightly larger than 90° angle, your shoulders relaxed. If you are sitting in a standard low chair, that means a keyboard tray or desktop just above the height of your legs, or even a keyboard on your lap. (But I would recommend not using regular chairs for too long at a stretch; I like alternating between a high saddle-type stool, standing up, sitting back in a reclining chair, lying down on a couch, etc.; switching positions every 30–60 minutes, and taking occasional breaks to go walk around.)
If your desk and chair are at a fixed height and there’s nothing you can do about it, then tilt the keyboard until your wrists are straight. There’s a reason that old typewriters and keyboards have such a steep tilt: on a standard table/chair (table too high, chair too low), you need a steep tilt to keep the wrists in a neutral position.
Don’t use a palm/wrist rest for typing. Use it in the breaks in between typing. While typing, leave your wrists floating in the air. Pretty much all palmrests are too low compared to the keyboard to be comfortable for use while typing: your wrist will need to bend upward for your palm to sit on the palmrest while you type. (But this is okay, because the palmrest is not really intended for use while typing.) If you need extra arm support, a forearm rest (especially those fancy ones that freely move around) may be helpful, but might be a bit expensive.