Right - the above posters are correct. If there's an additional issue, however, that makes this not the case for some reason, we'd certainly be interested in hearing more specifics from you on the issue.
The same thing happened to me twice. What I finally did to really fix the problem is that I let my phone drain to where there was almost no power at all and then I re-synced/re-charged with it connected to my laptop. I have yet to have any problems with my music since then.
Yeah. This randomly happened to me when I believe I had my 3G. I brought a song off iTunes and for some reason the iPod app said it had to update. I forced closed it and opened it back up and all my songs were gone. All I had was that one song lol.
All of music disappeared and just showed an icon on what was left (about a third) to download from the cloud. All other music was lost. When I tried to synch back to my laptop (Toshiba w/W8) it won't even see the iPhone (4s). I can't figure out what to do next. I rebooted the phone and computer.
It WILL show up on my wife's Mac however.
Try going to Settings>Music>Show All Music. Turn that on. See photo. This will make all music in your purchased list visible. Any song with a cloud beside it you can tap the cloud and download it back.
In Music app:
Hope this works. If not, you need to sync with iTunes on your wife's Mac.