In theory you can use any supported unit. What is important, however, is that in case you have only normal paragraph text that this text properly fills the page (meaning that it doesn't have to be stretched apart to fill the page body as there may be nothing to stretch). It is therefore useful to define the
\textheight as a function of
\baselineskip is the distance from one baseline to the next in a paragraph
\topskip is the distance from the top of the page area to the baseline of
the first line (if the page starts with a line)
For example in the standard book class (without an option like
\baselineskipis 12pt and the
\topskip is 10pt so a page with 40 lines should be 478pt.
Of course you could achieve the same by giving the equivalent of that value in
mm but given that baselineskips are traditionally specified in points ...
If you use a value that isn't a multiple of baselineskip + topskip you may find to get "underfull" warnings, because TeX then tries to stretch pages to fill all space (that would happen in the
bookclass, for example, as this class uses the setting `\flushbottom).
However, a better solution might be to use the package
geometry that does a lot of work like this for you when setting up the page area. Have a look at its documentation.