hi...this is a HUGE concern and very common one, in fact it is the first and most common reason pets are given up to shelters...but usually can be corrected once the reason is uncovered.
btw.....I have a male I've been going thru this with as well its NOT fun:(
first of all are you sure he is spraying??? as opposed to peeing??? there is a difference, when spraying they back up to something and lift their tail while standing than spray out vertically, and this is likely as ZQ mentioned due to marking territory from other cats/animals in the house now, or some that have been there previously and left their scent
or is he squatting and peeing on a FLAT surface?? this than is usually always caused by crystals or less likely a bladder infection. crystals are common with male cats in particular. this means the PH level in their urine is high (6-7 is normal) higher than 7 and they have struvite crystals that form and irritate the urethra causing pain....therefore he is trying to tell you it hurts when he pee's.
these are caused by a high carb diet...and low water intake. the very best thing you can do for a male cat in particular is make very sure you are feeding a canned WET food diet...NO kibble, these foods are so dehydrated that no amount of water they drink will compensate. Try a wet diet and try using a fountain for his drinking water, sometimes this encourages them to drink more...he needs to keep his bladder flushed, in order that these crystals don't plug off his urethra than you have an EMERGENCY if kitty can't pee.
also clean everywhere he has messed with an enzyme cleaner(avail at good pet stores) so he no longer has the scent of pee where he has gone.
Its a good idea to take him to a Vet and have his urine checked for the presence of crystals and to rule out a UTI (urinary tract infection) these aren't very common in cats but best to knw for sure what you are dealing with.
keep us posted, hope these suggestions have helped.
There are a few issues that need to be sorted out first to figure out why this is happening all of a sudden. Here are a few things that could cause this-a new cat/other animals in the house, you moved to a new area, don't clean the litter box at least twice a day, or your cat may have a bladder infection/crystals.
Let us know if you've got any of these issues going on.