It appears that when calculating the amount of players who need to sleep in order to skip the night, that amount is rounded down, which is somewhat counterintuitive (but may well be intentional).
To reproduce
Have two players in the same world
Run
/gamerule playersSleepingPercentage 100
Enter a bed
→ ✔ 1/2 players sleepingRun
/gamerule playersSleepingPercentage 99
Enter a bed
→ ❌ 1/1 players sleeping
Can confirm.