Interesting question. I didn't know the official answer, but
Lonely Planet Switzerland has some pretty good info:
"Free camping is not strictly allowed and should be discreet, but it is perfectly viable in the wide open mountain spaces, and is fairly common in places like Ticino. If the police come across you, they may not do anything (especially if you've been responsible with your rubbish) or they may move you on. A fine is theoretically possible. Farmers might let you pitch on their land - but ask first."
I've wild-camped several times here while bike touring, typically in wooded areas a short distance away from a road, and have never had any trouble.