a valve could hit a piston because the timing is off and the volve doesnt close in time and the piston comes up and helps it... a rough idle wouldnt cause that but try looking at all the valve springs, if one is broken the valve wouldnt spring shut but would be once again helped by the piston.
What happens if valve hits piston?
Cam lift and timing can put the valves dangerously close to the piston. ... In this automotive version of Clash of the Titans, the valves will almost always lose. If they hit the piston, you'll be lucky to get off with just a bent valve stem.
How can you tell if a valve is hitting piston?
Compression test all the cylinders, listen for "popping" through intake and exhaust. If a valve hit your piston you will know it.