The structural and electronic properties of twisted bilayer graphene are investigated from first principles and tight binding approach as a function of the twist angle (ranging from the first magic angle $theta=1.08^circ$ to $theta=3.89^circ$, with the former corresponding to the largest unit cell, comprising 11164 carbon atoms). By properly taking into account the long-range van der Waals interaction, we provide the patterns for the atomic displacements (with respect to the ideal twisted bilayer). The out-of-plane relaxation shows an oscillating (buckling) behavior, very evident for the smallest angles, with the atoms around the AA stacking regions interested by the largest displacements. The out-of-plane displacements are accompanied by a significant in-plane relaxation, showing a vortex-like pattern, where the vorticity (intended as curl of the displacement field) is reverted when moving from the top to the bottom plane and viceversa. Overall, the atomic relaxation results in the shrinking of the AA stacking regions in favor of the more energetically favorable AB/BA stacking domains. The measured flat bands emerging at the first magic angle can be accurately described only if the atomic relaxations are taken into account. Quite importantly, the experimental gaps separating the flat band manifold from the higher and lower energy bands cannot be reproduced if only in-plane or only out-of-plane relaxations are considered. The stability of the relaxed bilayer at the first magic angle is estimated to be of the order of 0.5-0.9 meV per atom (or 7-10 K). Our calculations shed light on the importance of an accurate description of the vdW interaction and of the resulting atomic relaxation to envisage the electronic structure of this really peculiar kind of vdW bilayers.