It is prohibited to recite a Davar Shebikedushah if one’s heart is exposed to immodesty, therefore there must be an external separation between one’s heart and private parts. However, thinking Torah thoughts is permitted. Wearing an unbelted robe or a long nightshirt, even though it completely covers you, is not enough. Therefore in order to recite a Davar Shebikedushah one can create a separation by tightening their robe firmly against their body at the heart or below, or wrap their arms around their chest below the heart as if hugging themselves.