We propose methods for synthesizing multilayer optical lattices of cold atoms in a layer-by-layer manner, to unlock the potential of optical lattices in simulating the fascinating physics of multilayer systems. Central to the approach is to compress the beam profile of a red-detuned Gaussian laser beam from disklike to a thin line by a telescope with two cylindrical lenses. A highly tunable multilayer optical lattice is obtained by passing the compressed Gaussian beam through an optical device consisting of beam splitters, mirrors, and glass plates. We illustrate the proposal with the displaced dice lattice, which is a trilayer lattice that maps to the dice lattice when projected to the same layer. Both the dice model and its interesting variants may be realized. For a model of fermionic cold atoms, featuring an isolated flat band between two dispersive bands, we find valley-contrasting interband transitions involving the flat band.