Yes, please do so. It's better to have answers clearly visible and posted as such.
All user content on Stack Exchange, including comments, is licensed under CC BY-SA, so it's ok to copy-paste it as long as you attribute it to the original author. From an ethical point of view, also, it's ok to copy someone else's content as long as you attribute it.
If you're just copying the content without contributing anything original, you may want to make your answer community wiki. If you expand an elliptic comment into a more detailed explanation of the same idea, don't use community wiki: your wording is your own.
See also How to handle questions which are answered in the comments? and many duplicates on the main meta site.