In the comics, Vision regains his memories through a series of events and interactions that trigger his internal processes and reconnect him to his past.
In the comics, Wolverine's recovery of his adamantium was often tied to new story arcs and developments. It could involve uncovering hidden technology or facing off against villains with the means to restore it.
Wolverine's claws come back in the comics because of his inherent mutant physiology. His healing factor works to repair and regrow them. Sometimes, specific story arcs introduce elements that facilitate or accelerate this process.
Thor's hammer return in the comics happened when he overcame various obstacles, showed great strength of character, and reconnected with the powers that granted him the hammer in the first place. It was a complex and exciting storyline.
Well, it happened through a complex series of events and encounters. Sometimes it was due to advanced technology or a special intervention by other characters.