Maybe, however I’ve heard that in Bedrock (including the bedrock variants, like pocket), when you place a non-full block (like a bed), it is waterlogged based on whether or not there is water where the block is placed.
If this is the case, then it might have to be Java exclusive. If that is the case, it’d have to be an advancement, and if it is an advancement then it needs a parent advancement. Maybe Sweet Dreams for sleeping in a bed or something.
BTW sorry for the long reply, I know way too much about Minecraft