In Harry Potter and the Chamber of Secrets we see that Nearly Headless Nick is petrified (for lack of better description) at one point by the basilisk:
It was Nearly Headless Nick, no longer pearly-white and transparent, but black and smokey, floating immobile and horizontal, six inches off the floor.
I don't recall any mention of Nick recovering in CoS but he does make many appearances in the later books in the series which tells us that he does recover. As he was a ghost he couldn't consume the mandrake potion directly. Is there any indication of what is done to bring Nick back to his typical ghostly state?