It's unimaginable to think of anyone writing this or any other poem the night before he was to be hanged, drawn, and quartered. That was Tichborne's fate and he certainly would have known about it beforehand. It's more likely the case that he wrote the poem sometime during a lengthy stay in prison and it was only afterwards that the story got about that he composed it the night before his death.
I also studied this in school around 2003/4, and its always stood out to me as a brilliant piece of poetry,
Chidiok Tichborne was senteneced to death under the charge of treason which was sentacble to one execution method, he was hung drawn and quatered!
I write this fully aware that no-one will ever read it, for who has ever heard of Chideock Tichborne? I first heard of him at school in the 1940s, and it is amazing that he wrote his Elegy on the eve of his execution in the Tower of London. I am not sure what the method of execution was in the 16th century, but he was disembowelled before he was dead so it must have been grisly, but knowing his fate he remained calm enough to compose this master-piece. It makes you wonder what else he could have written had he been allowed to live.