Queen Mary of Denmark has returned to royal duties after unexpectedly falling ill.