Depends on the goal. If just for aesthetics then any amount that will cover the bottom, for sand dwelling wrasses, 2-3 inches, for jawfish 5-6 inches and for a DSB for de nitrification then 6+ inches.
My sandbed is currently 1-2 inches but I will need to deepen it a bit as I'm looking for a sand dwelling wrasse to add soon.