Hot flow anomalies (HFAs) and foreshock bubbles (FBs) are frequently observed in Earth’s foreshock, which can significantly disturb the bow shock and therefore the magnetosphere-ionosphere system and can accelerate particles. Previous statistical studies have identified the solar wind conditions (high solar wind speed and high Mach number, etc.) that favor their generation. However, backstreaming foreshock ions are expected to most directly control how HFAs and FBs form, whereas the solar wind may partake in the formation process indirectly by determining foreshock ion properties. Using Magnetospheric Multiscale mission and Time History of Events and Macroscale Interactions during Substorms mission, we perform a statistical study of foreshock ion properties around 275 HFAs and FBs. We show that foreshock ions with a high foreshock-to-solar wind density ratio (>~3%), high kinetic energy (>~600eV), large ratio of kinetic energy to thermal energy (>~0.1), and large perpendicular temperature anisotropy (>~1.4) favor HFA and FB formation. We also examine how these properties are related to solar wind conditions: higher solar wind speed and larger (angle between the interplanetary magnetic field and the bow shock normal) favor higher kinetic energy of foreshock ions; foreshock ions are less diffuse at larger ; small , high Mach number, and closeness to the bow shock favor a high foreshock-to-solar wind density ratio. Our results provide further understanding of HFA and FB formation.