Legally, there are no restrictions I'm aware of: although you could leave yourself open to disciplinary procedures if you say you broke your leg and are then seen by your boss doing some mountain biking, for example. Similarly if you say you're off with severe food poisoning and are then seen at the funfair on waltzers. These are cases where you're blatantly abusing the system, though. The only legal issue is likely to be if you are claiming state benefits while off sick, and could have reasonably been at work.
Morally, it depends on what you are off with: I would generally say that you shouldn't be doing anything as strenuous as whatever you would be doing at work - otherwise why wouldn't you be at work? For example I'm unlikely to be too sick to work in an office, while being able to build a wall. This is a very complex point though, because whether you're contagious or able to work with customers may prevent you being in work, while still being relatively physically capable. Common sense should apply here.
For mental health issues it's trickier still: as work itself may be the problem. In this scenario, I would say it's important to make it clear to your manager the reason you're off, and don't "rub it in" to your colleagues, who may feel taken advantage of if they don't understand the situation and see your Facebook full of photos from the beach while they were at work.
Unfortunately, particularly with mental health issues, people aren't always as understanding as we'd like - mostly because it's unfamiliar. Everyone has had a stomach bug or the flu and can relate to how it feels, but some people simply can't comprehend depression as they've never experienced it. To avoid confusion (and potential further stress) ou may wish to consider telling colleagues (at least, direct ones) why you are off and why you are undertaking such activities. But don't feel you have to: this is between you and your manager. If you do not feel up to talking to colleagues, perhaps ask your manager to make it clear to the team why you're off and that they are aware you may be going to the funfair etc, to avoid any gossip or confusion (well meaning or otherwise)