The use of airways is, as you already specified, based on altitude/flight level. To be able to transition from higher airways to lower airways and vice versa, they need to intersect at NAVAIDs, such as fixes, VORs or NDBs. Where no restrictions are in place for the use of an airway, the flightplan can just contain the fix where the transition from lower to upper airway will take place. Let's take a look at this flightplan route from EGLL - London Heathrow to EDDG - Münster-Osnabrück:
DET UL6 DVR UL9 KONAN UL607 SPI UY862 PODEN Y862 KENUM UZ907 ABAMI Z907 HMM
Lower and upper airways in Europe are distinguished by prefixing the airway designator with a U for Upper. At the end of our flight to Münster, we intend to switch from UZ907 to Z907, because UZ907 does not connect
HMM. The flightplan routing validator at the CFMU understands that
HMM is a STAR/transition entry point to Münster and therefore considers the airways altitude restrictions to be met during descent.
If this was not the case and we would like to use airways restricted to certain altitudes/flightlevels, we would need to indicate this in the flightplan. Example:
Airways Z1 can only be used between FL195 and 245, airways UZ2 can only be used above FL245. We want to file our flightplan with a step climb and a final cruise level of FL290:
With RFL290 entered into the validator, the flightplan would not be accepted, as Z1 is only available below FL245. The portion of the flightplan to be accepted would need to be:
[...] ABCDE/F230N0260 Z1 FGHIJ/F290N0270 UZ2 KLMNO [...]
In summary, you can switch between upper and lower airways, if you can meet the altitude/flightlevel restrictions and any other restriction bound to the airway.
ICAO flavored anwer added on request by question op, even though original question is tagged with FAA.