The ability in experiments to control the relative twist angle between successive layers in two-dimensional (2D) materials offers an approach to manipulating their electronic properties; we refer to this approach as ``twistronics.'' A major challenge to theory is that, for arbitrary twist angles, the resulting structure involves incommensurate (aperiodic) 2D lattices. Here, we present a general method for the calculation of the electronic density of states of aperiodic 2D layered materials, using parameter-free Hamiltonians derived from ab initio density-functional theory. We use graphene, a semimetal, and MoS2, a representative of the transition-metal dichalcogenide family of 2D semiconductors, to illustrate the application of our method, which enables fast and efficient simulation of multilayered stacks in the presence of local disorder and external fields. We comment on the interesting features of their density of states as a function of twist angle and local configuration and on how these features can be experimentally observed.