Johnson had his first, nearly fatal, heart attack in July 1955. He suffered a second one in April 1972, after leaving office. Despite warnings from his doctors, he had been unable to quit smoking after he left the Oval Office in 1969.
Johnson's retirement of just over four years was not a happy one. He grew his hair long and is described by one biographer as "waiting to die." According to author Michael Beschloss, on the day that Richard Nixon was sworn in as President in January of 1969, Johnson got on the plane to Texas and took out a cigarette. Although he had reportedly snuck cigarettes during his time in the White House, he had not smoked openly in front of his daughters. One of them pulled the cigarette out of his mouth and said to him "Daddy, what are you doing, you're going to kill yourself." Johnson reportedly took the cigarette back and said "I've raised you girls, I've now been President, now it's my time!" In the words of Beschloss, Johnson "went into a very self-destructive spiral."
After leaving the presidency in 1969, Johnson went home to Texas to live at his ranch. In 1971, he published his memoirs, The Vantage Point and that same year, the Lyndon Baines Johnson Library and Museum opened near the campus of The University of Texas at Austin. (I went there this summer and it's an amazing place, I highly recommend seeing it if you get the chance. I journalled about it here.)
During the 1972 presidential election, Johnson supported Democratic presidential nominee George McGovern, despite the fact that McGovern had long opposed Johnson's foreign and defense policies. Johnson was reportedly upset with the fact that his longtime friend former Texas Governor John Connally had served as President Richard Nixon's Secretary of the Treasury and then stepped down to head "Democrats for Nixon", a group funded by Republicans. It was the first time that Connally and Johnson were on opposite sides of a general election campaign.
Johnson donated his Texas ranch in his will to the public to form the Lyndon B. Johnson National Historical Park, with the provision that the ranch "remain a working ranch and not become a sterile relic of the past".