This behavior is commonly known as the Zoomies. There's a physical rush of energy. Dogs do this because of anything from relief, shaking to dry off, to rolling around attempting to get rid of this mysterious new smell. It could be a release of nervous energy due to stress or the happiness of being done.