Yes, it is legal in most of the countries. If you are liquidating limited coins, then there should not be any problem. But for the transaction of huge amount, you might have to follow local rules and regulations.
there will be no problem to exchange bitcoin, as long as the amount is still reasonable this is still not a problem, if the amount is not reasonable and too large maybe we can report to the bank that our money is not a crime, accompanied by legal data, all it won't be a problem, so bitcoin is legal, including exchanging it into a country's currency.