While you can use a CPAP machine while side sleeping, side sleeping may push your mask out of place, meaning you won’t receive the air. There are specific masks designed for CPAP users who side sleep, but they’re notoriously less comfortable than traditional masks. If you’re willing to overlook that, try using a nasal pillow or full face mask.
CPAP hoses may also be annoying to deal with at night when side sleeping. In this case, consider getting a CPAP pillow. These pillows have cutouts for you to place your hoses in to keep them out of your way while you sleep. This way you won’t have to fight your CPAP hoses all night long and can sleep comfortably!