This is a small bug in the level editor.. I had to experience this myself a lot... Restart your game (save it before obv) and it should be fixed
also if this happens on a new terrain you made, make sure the terrains position is set to the size of it. so if the terrain is 1024x1024 then make the postion 1024 1024 [Z value stays the same]
This happens for me too. Sometimes when I make hills or noise, the FPS goes down and then my cursor involuntarily goes to a random spot on a terrain, causing that.