When you write /tp @p ~ ~1 ~ in a command block, it will teleport the player in block up, so 1 block above the old coordinates of the player, rather than above the command block.
This is already easily achieveable by using /execute @p ~ ~ ~ /tp ~ ~1 ~
and relative coordinates of commands executed by a command block, are always relative to the command block right? (except for the /execute command)
Intended, at best this is a feature suggestion.
Try /help tp