He suffered from various medical problems
JFK's health problems were well-kept and a secret throughout his presidency, but they are now widely acknowledged. He was admitted to the hospital frequently as a child for treatment of ulcers, colitis, and other illnesses. Along with that, he lived with debilitating lower back discomfort (for which he had 4 unsuccessful surgeries).
Before becoming president, Kennedy was given last rites three times. Kennedy had bad health his whole life, and out of concern for his impending demise, the nation's first Catholic president underwent three times the sacramental last rites of the church. Kennedy contracted Addison's disease, a rare illness of the adrenal glands while visiting England in 1947 and was given only a year or two to live. Kennedy was so unwell upon his return to America onboard the Queen Mary that a priest was called to perform final rites. In 1951, while traveling in Asia and again in 1954, after slipping into a coma due to an illness following surgery to treat his persistent back issues, he received the sacrament.