I recently did this, it was pretty straight forward, you just slowly take the gravel out, siphoning is a good way if you have that much suction, but if not give it a good clean and then just take it out. Sand is tricky, you want to make sure it is rinsed off really well and clean. There's many methods to getting it into the tank, just be careful not to clog any filters.
I filled up an empty two liter with sand. Put it in the tank right side up, until the empty space was filled with water, then flipped it upside down to let the sand pour out. This creates a gravity effect where the sand comes out, but all the dirt, gunk, and small particles stay in the two liter bottle. This makes the sand going into the tank superclean and clear. I tried finding a YouTube video on this method, no luck, but they are out there
This method does take some time.