In this Letter, we present a photonic compressive sampling scheme based on optical sampling and random demodulation for microwave spectral analysis. A novel (to our knowledge) approach to realizing the multiplication of a pseudorandom binary sequence and the input microwave signal of interest in the optical domain is proposed, which largely simplifies the implementation of the compressive sampling. A spectrally sparse signal can be successfully captured by an electrical digitizer with a sampling rate much lower than the Nyquist rate with the help of random demodulation and the sparse reconstruction algorithm. Identification of the signals with multiple frequency components is successfully demonstrated.