While I nodded, nearly napping, suddenly there came a tapping,
The author here is telling us that he was asleep, which could suggest that his account hereafter is unreliable. It could be a dream, or misremembered or exaggerated by his vulnerable state.