Recently, Wang, Wei and Zhang define the recollement of extriangulated categories, which is a generalization of both recollement of abelian categories and recollement of triangulated categories. For a recollement (A, B, C) of extriangulated categories, we show that n-tilting (resp. n-cotilting) subcategories in A and C can be glued to get n-tilting (resp. n-cotilting) subcategories in B under certain conditions.