The B0bar-B0 and Bsbar-Bs production asymmetries, AP(B0) and AP(Bs), are measured by means of a time-dependent analysis of B0 -> J/psi K*0, B0 -> D- pi+ and Bs -> Ds- pi+ decays, using a data sample corresponding to an integrated luminosity of 1.0 fb^{-1}, collected by LHCb in pp collisions at a centre-of-mass energy of 7 TeV. The measurements are performed as a function of transverse momentum and pseudorapidity of the B0 and Bs mesons within the LHCb acceptance. The production asymmetries, integrated over pT and eta in the range 4 < pT< 30 GeV/c and 2.5<eta<4.5, are determined to be AP(B0) = (-0.35 +/- 0.76 +/- 0.28)% and AP(Bs) = (1.09 +/- 2.61 +/- 0.66)%, where the first uncertainties are statistical and the second systematic.