Q. When citing an endnote, should the page number be the page the note callout appears on or the page where the endnote is at the end of the book (24n5 vs. 385n5)?
A. Footnote or endnote, you’re citing the note itself, not its reference number in the text. For an endnote, the page number to cite is the one at the end of the book where the note can be found (or 385n5 in your example).
This does mean that readers who follow the citation to its source will need to track down the note reference in the text if they want to see the context for that note, but endnotes are almost always less user-friendly than footnotes (unless the notes are linked, as in an ebook).