Preferently, yes, you can attemp it before going to sleep, but its far harder (in most cases) than after sleeping.