Hi,
In most cases it is not a sin, but it is very disrespectful. You should remain and give thanks for His Presence within you. There is no greater gift in all of creation. Holy Communion is a time for intimacy with Him. At least thank Him for all that He suffered for on your behalf. How many people have ever died for you? Thank Him, thank Him and thank Him some more.
Fr. Vincent Serpa, O.P.