We theoretically investigate elastic, piezoelectric and optical properties of wurtzite GaN/AlN quantum dots, having hexagonal pyramid-shape, stacked in a multilayer. We show that the strain existing in quantum dots and barriers depends significantly on the distance between the dots i.e. on the width of AlN barriers. For typical QDs, having the base diameter of 19.5nm, the drop of the electrostatic potential in the quantum dot region slightly decreases with decreasing of the barrier width. This decrease is however much smaller for QDs than for superlattice of GaN/AlGaN quantum wells, with thickness similar to the height of QDs. Consequently, the band-to-band transition energies in the vertically correlated GaN/AlN QDs show unexpected, rather weak dependence on the width of AlN barriers. Increasing the QD base diameter leads to stronger decreasing dependence of the band-to-band transition energies vs. the width of AlN barriers, similar to that observed for superlattieces of QWs.