The Advancement Sweet Dreams is not to sleep in a bed, is to change your respawn point and in 1.15 clicking in a bed in daytime changes the respawn point anyways, the advancement doesn't grant to the player, using /spawnpoint and /setworldspawn doesn't grant either.
Linked issues
is duplicated by 2
Comments 4
I suppose you could look at this as a feature modification and not a bug, thus concerning either a change in the advancement description (which would be a pity to do such a thing...) or the way spawnpoints are set with Beds; which may have to be reviewed.
The description of the advancement is changed to "Sleep in a bed to change your respawn point"; it explicitly says "sleep in a bed", ie. the intended condition is the action of sleeping in a bed, not resetting respawn point. Besides, 20w12a adds yet another way to reset spawn point (in the nether) so the clarification is needed anyway.
I imagine that this is intended, however the advancement description just says "Change your respawn point".