I suppose it could be a number of things but it sounds like a bad coil to me. My buddies car had the same problem and we replaced the coils one by one until we found the faulty one.
Current: 2015 M235i F22 BSM (FBO)
Current: 2015 X5 M Sport CBM (hers)
Previous: 2008 335i E90 Tiag (FBO)