When Paul Hunter, director of theatre company Told By An Idiot, told writer Carl Grose he had appeared on 1970s Saturday morning Television show Tiswas when he was eight, Grose thought he had struck gold.

The pair had decided to do a show based around the curious phenomenon of shows such as Tiswas which, while ostensibly made for children, were steeped in some very grown-up shades of anarchy in a way that made them cult viewing for students, even as some parents changed channels to the BBC's altogether safer world of Noel Edmonds and Swap Shop. Hunter, alas, had come out of the experience unscarred.

"I thought initially we were going to be making a show about our director exorcising his demons," says Grose, "but as it turned out, he was mates with someone whose dad was a cameraman or something like that, and he said he remembers being in the cage and having water thrown over him. But after that it all gets a bit hazy, which was frustrating for me."

There is an exorcism of sorts in Never Try This At Home, the show that resulted from Grose and Hunter's line of inquiry, which tours to the Traverse Theatre, Edinburgh, this week. In the show, the purging is more to do with the presenters of fictional programme Shushi who reunite to take part in a Jeremy Kyle style programme years after an on-air incident forces the show to be cancelled forever.

"What fired us up about Tiswas," says Grose, "was that it went out live on ITV, it was very much made up on the spot and it was quite anarchic.

"But we also looked at a lot of other things, such as Martin Scorsese's film The King Of Comedy and Network, all these darkly humorous things about the media and celebrity. Never Try This At Home is not a nostalgia show. It may be about children's television, but it is for adults, and it is really quite dark."

Most people of a certain age will have memories of Saturday morning TV, whether it was a caller telling 1980s band Matt Bianco exactly what they thought of them on Swap Shop, or else the little boy bellowing a wildly off-key rendition of Art Garfunkel's Watership Down theme song Bright Eyes while dressed in a rabbit suit on Tiswas. Other famous clips from Tiswas include a small boy asking Chris Tarrant if he can go to the toilet, and Sally James innocently asking Kevin Rowland where the name of his band Dexy's Midnight Runners came from (It came from Dexedrine, a recreational drug and the "midnight runners" referred to the energy it gave, enabling people to dance all night.)

Tiswas hosts Tarrant and James led a regular line-up of John Gorman, formerly of 1960s Liverpool poetry troupe turned chart stars The Scaffold, a young Lenny Henry doing impressions of TV botanist David Bellamy and a Rastafarian character with a fetish for condensed milk, and Bob Carolgees with his punk puppet Spit The Dog.

Tiswas also gave air-time to The Phantom Flan Flinger, and the phenomenon of the Dying Fly.

With guests including comedians Bernard Manning and Frank Carson, Led Zeppelin's Robert Plant and assorted members of Electric Light Orchestra, Michael Palin, future Dr Who and former Ken Campbell associate Sylvester McCoy, the anything-goes approach of Tiswas fell somewhere between a working man's club, a performance art happening and a fringe theatre show.

Grose says: "Just to have Sylvester McCoy on it being interviewed while pretending to be a car, there was something very punk about that, and there was a variety theatre sort of feel to it as well."

Under the name The Four Bucketeers, the Tiswas presenters had a hit record with The Bucket Of Water Song, and so successful was the show that it spawned a late night show called O.T.T. Despite similarly anarchic intentions, the show's adults-only format never really took off.

Given how 1970s TV celebrities have come under scrutiny over the last couple of years since Jimmy Savile was exposed as a serial paedophile, much of the era's mix of innuendo and apparent innocence has been tainted. While not overtly referenced in Never Try This At Home, neither was this something that could be ignored.

"When we started working on the show, nothing had happened," Grose says. "Then everything exploded, and although we did not want to make it about what happened with Jimmy Savile and so on, we had to include it somewhere. You can't help but look back at all that stuff that was on TV with tarnished eyes now, and you get a sense that during that period of history things were out of control to some extent. With all the Jimmy Savile stuff, the lack of responsibility was outstanding."

Without Tiswas, however, television would have been a lot duller, and the spirit of its barely-controlled chaos has arguably trickled down into the alternative comedy boom, as well as theatre companies such as Told By An Idiot.

For a hint of what audiences should expect from Never Try This At Home, Grose points to a letter the company received from Tarrant.

"He found out about the show, and we thought he was going to sue us," Grose says. "As it was, he said he hoped we didn't stick to the script much, and that no audience member went home dry."

Never Try This At Home is at the Traverse Theatre, Edinburgh, from Thursday to Saturday.

l www.traverse.co.uk