For nets you you set your selection filter to Nets and then do a rubberband select of the whole sheet (this would be a sheet by sheet solution). Now with all the nets selected you can toggle the visibility of the name.
Similarly for components - only set the selection filter to symbols.