Swap files do not need to full of zeros. The kernel keeps track of what blocks are being used.
However, man mkswap may warn you against using fallocate:
Note that a swap file must not contain any holes. Using cp(1) to create the file is not acceptable. Neither is use of fallocate(1) on filesystems that support preallocated files, such as XFS or ext4, or on copy-on-write filesystems like btrfs. It is recommended to use dd(1) and /dev/zero in these cases. Please read notes from swapon(8) before adding a swap file to copy-on-write filesystems.
(Not all versions of the manpage include that)
Further swapon says:
The swap file implementation in the kernel expects to be able to write to the file directly, without the assistance of the filesystem. This is a problem on preallocated files (e.g. fallocate(1)) on filesystems like XFS or ext4, and on copy-on-write filesystems like btrfs.
Another version of the manpage says
Preallocated files created by fallocate(1) may be interpreted as files with holes too depending of the filesystem. Preallocated swap files are supported on XFS since Linux 4.18.
So the question as to whether you can use fallocate to create swapfiles very much depends on your kernel and your file system.
In comparison, a simple dd will work.