like gg said it could be the substrates.. 'possibly' either the gravel was inert or the sand is either way one or the other was putting the ph up by adding elements to the water. have u tried testing your tap water to see what the ph of that is then maybe you will know which has caused the swing. what was the gh before you added the sand?
imo its best to stick with a substrates that wont alter your ph.. what sort of sand are you useing.. it seems like the gravel was the problem but again that depends on what the water is to start with. post your tap water physics mate. ph, gh,
another thing.. co2 will exsist in the tank regardless of whether you add it or not, the fish and bacteria all produce co2 so there will be some tini traces