When a players sleepingIgnored value is set to true by player.setSleepingIgnored(true) it does change as expected (player.isSleepingIgnored() returns true).
However if the player is a spectator his sleeping state is not ignored. Even though the value is set correctly..
Other people on the server can not sleep unless the spectator changes to a different gamemode. As soon as his gamemode switches the sleeping works.