We deal with Orlicz-Sobolev embeddings in open subsets of R-n. A necessary and sufficient condition is established for the existence of an optimal (i.e., largest possible) Orlicz-Sobolev space continuously embedded into a given Orlicz space.
Moreover, the optimal Orlicz-Sobolev space is shown whenever it exists. Parallel questions are addressed for Orlicz-Sobolev embeddings into Orlicz spaces with respect to a Frostman measure, and, in particular, for trace embeddings on the boundary.