I've never done a trick by accident, but I've had accidents lead to landing new tricks.
One time I was skating this bump to traffic cone spot thing some friends and I rigged up and I was trying to late shove it over it, but the board was skinnier than I used to, so it kept flipping half way. I decided to just go with it, and flicked my foot a little more and within a few more tries I landed my first late nollie varial flip
When I first learned front feebles on tranny I wouldn't turn my shoulders enough and I was falling out of it like I was going to fakie. I realized those felt a lot like rock to fakies and learned front feeble to fakie before I learned it to regular.
When I was first skating I was trying to nosegrinds but had trouble popping onto ledges. I eventually learned them and showed it to an older friend, at which time he pointed out that I was actually doing frontside crooks. Then I found out front crooks are really cool and tried to do them on purpose....I've maybe done a total of 10 since then, and I originally learned the trick about 17 years ago