Night before and day of are two very different scenarios.
SP is next to impossible to land either way unless it's the lesser ones like Mine Train. Forget about Rise or Cosmic Rewind, even 3 days out those are a challenge. MP is a similar story, you'll be left with mostly dregs. The day of your visit otoh is very doable with MP but you have to be strategic about booking. Disney does open up additional MP inventory early the morning of, I have seen tons of LLs that were sold out for days beforehand come back. I have pulled every single LL in a park the day of before, at HS and at Epcot.
If at all humanly possible try to walk in with something prebooked, even if it's trash. It's a lot easier to modify an existing LL into a better one than to land one outright from nothing. And you want something as close to park open as possible so you can tap in and start booking free of tier restrictions.