A number of moire graphene systems have nearly flat topological bands where electron motion is strongly correlated. Though microscopically these systems are only quasiperiodic, they can typically be treated as translation invariant to an excellent approximation. Here we reconsider this question for magic angle twisted bilayer graphene that is nearly aligned with a hexagonal boron nitride(h-BN) substrate. We carefully study the effect of the periodic potential induced by h-BN on the low energy physics. The combination of this potential and the moire lattice produced by the twisted graphene generates a quasi-periodic term that depends on the alignment angle between h-BN and the moire graphene. We find that the alignment angle has a significant impact on both the band gap near charge neutrality and the behavior of electrical transport. We also introduce and study toy models to illustrate how a quasi-periodic potential can give rise to localization and change in transport properties of topological bands.