Palpitations are commonly experienced after cannabis consumption and are usually ascribed to the sinus tachycardia or more rarely to premature ventricular contractions.I personally have pain in my knees from running and use a a CBD topical for all of my joints.
Start with a low dose. That's vital. The type or strain depends greatly on your individual physiology, but indica strains are generally good for sleep. I also find that cannabis helps for insomnia most when you give yourself an hour or more to "come down" before actually sleeping. Otherwise, it can stimulate your thoughts and keep you awake. As for avoiding palpitations, the low dose should help. Higher CBD strains are a great option too, as unmitigated THC causes most of the negative reactions such as heart-racing and overactive thinking. Still, THC is in many of the strains that are good for sleep. It's all about finding that balance for yourself. All in all, a high CBD indica strain is a good option, and always start with a low dose.