iCloud is the native Apple way for storing and syncing data between Apple devices. If iCloud is activated for Pillow, all your sleep data and recorded sounds will be stored on iCloud and they will be available across all devices with the same iCloud account. Deactivating iCloud on a device will result to data not being available, until iCloud is active again.
If you want to migrate your data locally please check the related question below: