From Space.com:
In his 2001 book “Almost History,” which chronicles backup plans, speeches and documents that were never needed, author Roger Bruns details the origins of the Apollo 11 failure speech. They can be traced to astronaut Frank Borman, who commanded the 1968 Apollo 8 mission around the moon, who recommended to Nixon speechwriter William Safire that it would be prudent to have a plan in case the Apollo 11 astronauts suffered a very public demise, Bruns explained.
According to the plan, Bruns added, Nixon would have called the wives of the Apollo 11 astronauts to express his condolences and then give the following speech:
“Fate has ordained that the men who went to the moon to explore in peace will stay on the moon to rest in peace. These brave men, Neil Armstrong and Edwin Aldrin, know that there is no hope for their recovery. But they also know that there is hope for mankind in their sacrifice.
“These two men are laying down their lives in mankind's most noble goal: the search for truth and understanding. They will be mourned by their families and friends; they will be mourned by their nation; they will be mourned by the people of the world; they will be mourned by a Mother Earth that dared send two of her sons into the unknown.
More here.