don't believe this 80's bullshit broscience invented by supplement companies to sell you casein to take before bed.
you want to evacuate your bowels before bed so your body can rest without interference. making your body process protein powder is the dumbest thing ever if you think about it. don't eat a good 2 hours before bed and your sleep quality will improve drastically and that will lead to better recovery.
slow digesting anything will severely interfere with your sleep. the only thing that you can get away with eating near bedtime would be some water heavy fruits like melon for example which are fast digesting