We have studied the motion of bubbles and particles in the near-wall region of a turbulent boundary layer, to investigate the influence of the unsteady turbulent structure. The velocity field was computed using Proper Orthogonal Decomposition (POD), and the trajectories of bubbles and particle have been computed by integrating their equation of motion. We have used this to investigate the roles, and the relative importance, of the different forces acting on bubbles and particles, We find that the unsteady turbulent structure plays an important role in the preferential accumulation of bubbles and particles. The accumulation of bubbles depends on a rather complicated interaction between the pressure gradient and the lift force; neither is sufficient, acting on its own, to explain the strong accumulation observed when they act together.