Rooted in TCM (Traditional Chinese Medicine):
神 here is the vital spirit/mental energy, not 'god'. To
养 (nourish) it means to consciously settle and replenish — closer to brief meditation than a nap. The set phrase
闭目养神 (close-eyes rest-spirit) is by far the most common usage.