I'm thinking a little more information is needed.
Did the bike always do this or is this a recent occurrence?
What work has been done recently?
I experienced the exact same circumstances a couple of years ago. Turned out to be my aftermarket Nology coils. Swapped the stock coils back in and zero problems. Nology made good on both coils btw and I have had no problems since.
Moving this to misc tech....